Skip to content

Commit

Permalink
restrict branch for workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyisaev2 committed Dec 18, 2023
1 parent 083b3d6 commit 2089eeb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ on:
# ...

jobs:
goreleaser:
release:
runs-on: ubuntu-latest
steps:
- name: Fail if branch is not main
if: github.ref != 'refs/heads/main'
run: |
echo "This workflow should not be triggered with workflow_dispatch on a branch other than main"
exit 1
- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down

0 comments on commit 2089eeb

Please sign in to comment.