fix: move Docker builds before version bump commit to prevent self-cancellation

This commit is contained in:
Ryan Moon
2026-04-01 22:14:10 -05:00
parent 038ea22068
commit 8eb116a9a1

View File

@@ -45,16 +45,6 @@ jobs:
") ")
echo "version=$VERSION" >> $GITHUB_OUTPUT echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Commit version bump
run: |
git config user.name "lunarfront-bot"
git config user.email "bot@lunarfront.tech"
git remote set-url origin https://lunarfront-bot:${{ secrets.BOT_TOKEN }}@git.lunarfront.tech/ryan/lunarfront-app.git
git add packages/backend/package.json
git commit -m "chore: bump version to v${{ steps.version.outputs.version }}"
git pull --rebase origin main
git push origin main
- name: Login to registry - name: Login to registry
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login registry.lunarfront.tech -u ryan --password-stdin run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login registry.lunarfront.tech -u ryan --password-stdin
@@ -85,6 +75,16 @@ jobs:
docker push registry.lunarfront.tech/ryan/lunarfront-frontend:$SHA docker push registry.lunarfront.tech/ryan/lunarfront-frontend:$SHA
docker push registry.lunarfront.tech/ryan/lunarfront-frontend:latest docker push registry.lunarfront.tech/ryan/lunarfront-frontend:latest
- name: Commit version bump
run: |
git config user.name "lunarfront-bot"
git config user.email "bot@lunarfront.tech"
git remote set-url origin https://lunarfront-bot:${{ secrets.BOT_TOKEN }}@git.lunarfront.tech/ryan/lunarfront-app.git
git add packages/backend/package.json
git commit -m "chore: bump version to v${{ steps.version.outputs.version }}"
git pull --rebase origin main
git push origin main
- name: Logout - name: Logout
if: always() if: always()
run: docker logout registry.lunarfront.tech run: docker logout registry.lunarfront.tech