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
15 changes: 9 additions & 6 deletions .github/workflows/github-release-issue-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check if this Wednesday is the first one of the month
env:
GH_TOKEN: ${{ github.token }}
run: |
upcomingWed=$(date -d "next Wednesday" +%-d)
if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
echo "Triggered manually, don't check if the week contains the first Wednesday of a month. Continue the process."
elif (( upcomingWed > 7 )); then
echo "Triggered automatically, the week does not contain the first Wednesday of a month. End the process."
exit 0
gh run cancel ${{ github.run_id }}
sleep infinity
else
echo "Triggered automatically, the week contains the first Wednesday of a month. Continue the process."
fi

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
Loading