Skip to content

Commit

Permalink
auth
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luís Rodrigues committed Feb 22, 2024
1 parent 2146049 commit d3970e2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Authenticate
run: |
git config --global user.email "sentinel@inesctec.pt"
git config --global user.name "Sentinel"
- name: Check if main branch exists on remote
run: git ls-remote --exit-code --heads origin main || echo "::set-output name=branch_exists::false"
id: check_main_branch
Expand All @@ -20,15 +25,15 @@ jobs:
if: steps.check_main_branch.outputs.branch_exists == 'false'
run: |
git checkout -b main
git push -u origin main
git push origin main
- name: Fetch main branch
run: git fetch origin main

- name: Merge changes into main
run: |
git checkout main
git merge --allow-unrelated-histories ${{ github.ref }}
git merge ${{ github.ref }}
- name: Push changes to main
run: git push origin main
Expand Down

0 comments on commit d3970e2

Please sign in to comment.