-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action to sync development branch
Signed-off-by: Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |