Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip release on initial commit #86

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
6 changes: 5 additions & 1 deletion .github/workflows/module-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/module-github-pull-request.yaml
release:
if: github.event_name == 'push' && github.ref_name == 'main'
# If the push event triggering this workflow is the first commit on a branch,
# `github.event.before` will always be "0000000000000000000000000000000000000000".
# With this knowledge, we can skip the release process on the initial commit,
# which is handled by CI during repository bootstrapping.
if: github.event_name == 'push' && github.ref_name == 'main' && github.event.before != '0000000000000000000000000000000000000000'
uses: ./.github/workflows/module-github-release.yaml