Skip to content

Commit cda3352

Browse files
authored
Fix the Github release workflow triggering on the wrong day (#801)
1 parent 57e94f3 commit cda3352

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/github-release-issue-pr.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,26 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
1520
- name: Check if this Wednesday is the first one of the month
21+
env:
22+
GH_TOKEN: ${{ github.token }}
1623
run: |
1724
upcomingWed=$(date -d "next Wednesday" +%-d)
1825
if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
1926
echo "Triggered manually, don't check if the week contains the first Wednesday of a month. Continue the process."
2027
elif (( upcomingWed > 7 )); then
2128
echo "Triggered automatically, the week does not contain the first Wednesday of a month. End the process."
22-
exit 0
29+
gh run cancel ${{ github.run_id }}
30+
sleep infinity
2331
else
2432
echo "Triggered automatically, the week contains the first Wednesday of a month. Continue the process."
2533
fi
2634
27-
- name: Checkout repository
28-
uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 0
31-
3235
- name: Setup Node.js
3336
uses: actions/setup-node@v3
3437
with:

0 commit comments

Comments
 (0)