Skip to content

Commit

Permalink
Add action to sync development branch
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
  • Loading branch information
gmazzap committed Mar 15, 2024
1 parent ac93ff6 commit 501d925
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/sync-deployment-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Sync Development Branch

on:
push:
branches:
- 'version/2'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOYBOT_SSH_PRIVATE_KEY }}

- name: Set up Git
run: |
git config --global user.email "${{ secrets.DEPLOYBOT_EMAIL }}"
git config --global user.name "${{ secrets.DEPLOYBOT_USER }}"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.DEPLOYBOT_API_TOKEN }}
ssh-key: ${{ secrets.DEPLOYBOT_SSH_PRIVATE_KEY }}

- name: Merge target branch
run: |
git checkout development
git merge ${{ github.ref_name }}
git push

0 comments on commit 501d925

Please sign in to comment.