Skip to content

Commit

Permalink
add github action step to merge 'app' into 'main' on successful job c…
Browse files Browse the repository at this point in the history
…ompletion
  • Loading branch information
bullet-ant committed Sep 15, 2024
1 parent 03d785d commit 2ad1322
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@ jobs:
- name: Push Docker image
run: |
docker push ${{ secrets.DOCKER_USER }}/gitops-app:${{ steps.get_version.outputs.version }}
# Step 8: Merge app branch into main if build succeeds
- name: Merge app branch into main
if: success() # Only run this step if all previous steps succeeded
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
git checkout main
git merge --no-ff app
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2ad1322

Please sign in to comment.