9bd81f563be75feb5c6caf51bef1af3fe8540145
.github/workflows/merge-main-into-docker-25.yml
| ... | ... | @@ -17,13 +17,21 @@ jobs: |
| 17 | 17 | with: |
| 18 | 18 | ref: docker-25 |
| 19 | 19 | fetch-depth: 0 # fetch the whole thing to make sure the histories merge |
| 20 | + token: ${{ secrets.REPO_TOKEN_FOR_MERGE_AND_PUSH }} |
|
| 21 | + - name: Determine merge commit |
|
| 22 | + id: merge-source |
|
| 23 | + run: | |
|
| 24 | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then |
|
| 25 | + echo "sha=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT" |
|
| 26 | + echo "label=main (latest)" >> "$GITHUB_OUTPUT" |
|
| 27 | + else |
|
| 28 | + echo "sha=${{ github.event.workflow_run.head_sha }}" >> "$GITHUB_OUTPUT" |
|
| 29 | + echo "label=main (${{ github.event.workflow_run.head_sha }})" >> "$GITHUB_OUTPUT" |
|
| 30 | + fi |
|
| 20 | 31 | - name: Merge main into docker-25 |
| 21 | - uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # v1.4.0 |
|
| 22 | - env: |
|
| 23 | - GH_TOKEN: ${{ secrets.REPO_TOKEN_FOR_MERGE_AND_PUSH }} |
|
| 24 | - with: |
|
| 25 | - type: now |
|
| 26 | - from_branch: main |
|
| 27 | - target_branch: docker-25 |
|
| 28 | - message: Auto-merging main into docker-25 after successful release build |
|
| 29 | - github_token: ${{ secrets.REPO_TOKEN_FOR_MERGE_AND_PUSH }} |
|
| 32 | + run: | |
|
| 33 | + git config user.name "github-actions[bot]" |
|
| 34 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
|
| 35 | + git merge ${{ steps.merge-source.outputs.sha }} \ |
|
| 36 | + -m "Auto-merging ${{ steps.merge-source.outputs.label }} into docker-25 after successful release build" |
|
| 37 | + git push origin docker-25 |