Skip to content

Commit 3a82d85

Browse files
committed
Remove entire check branch block. GitHub actions doesn't exit early.
1 parent 7a118dc commit 3a82d85

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

.github/workflows/test_release.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,11 @@ env:
2222
DEV_VERSION_ENV_KEY: BEST_PRACTICES_VERSION_DEV
2323

2424
jobs:
25-
check-branch:
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Check if the branch is main for workflow dispatches
29-
run: |
30-
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ github.ref }}" != "refs/heads/main" ]; then
31-
echo "This workflow can only run on the main branch. Exiting."
32-
exit 0
33-
fi
34-
echo "Branch is main, proceeding with the job."
35-
36-
- name: Continue with the action
37-
run: echo "Performing the main branch actions."
38-
3925
create-dev-version:
4026
# Generate the dev version suffix based on the current date.
4127
# Tag name:
4228
# <version>.dev<yyyymmdd><iteration>
4329
name: Create dev version string
44-
needs:
45-
- check-branch
4630
runs-on: ubuntu-latest
4731
outputs:
4832
dev_version: ${{ steps.output-dev-version.outputs.dev_version }}

0 commit comments

Comments
 (0)