Skip to content

Commit

Permalink
update permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rtexR committed Oct 17, 2024
1 parent 7450c80 commit d78d808
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/sync-dev-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ on:
workflow_dispatch:

jobs:
rebase-development-onto-main:
sync-branches:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
Expand All @@ -23,6 +21,15 @@ jobs:
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"
- name: Setup SSH Keys and known_hosts
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
mkdir -p ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Fetch all branches
run: git fetch origin

Expand All @@ -38,7 +45,7 @@ jobs:
run: |
git checkout main
git merge development --ff-only
git push origin main
git push [email protected]:${GITHUB_REPOSITORY}.git main
- name: Handle rebase conflicts
if: failure()
Expand Down

0 comments on commit d78d808

Please sign in to comment.