Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@ on:
- 'v*.*'

jobs:
check-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Verify tag is on main
run: |
git fetch origin main
if ! git merge-base --is-ancestor ${{ github.sha }} origin/main; then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git merge-base --is-ancestor ${{ github.sha }} origin/main returns 1 as exit code if not ancestor.

echo "::error::Tag must be on the main branch"
exit 1
fi

goreleaser:
needs: check-branch
timeout-minutes: ${{ fromJSON(vars.DECK_WORKFLOW_RELEASE_TIMEOUT || '20') }}
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -40,6 +56,7 @@ jobs:
path: dist/*

build-push-images:
needs: check-branch
timeout-minutes: 120
runs-on: ubuntu-latest
permissions:
Expand Down