Skip to content

Commit

Permalink
Merge pull request #3485 from alexcrichton/manual-trigger-bump
Browse files Browse the repository at this point in the history
Add a manual trigger to force CI to bump crate versions
  • Loading branch information
fitzgen authored Oct 28, 2021
2 parents 9a4afc5 + 909a5d5 commit 5c3155f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ on:
# https://crontab.guru/#0_0_8-14_*_1
- cron: '0 0 8-14 * 1'

# Allow manually triggering this workflow remotely via a curl request,
# described at
# https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event
#
# Note that this can be also triggered by running the script in
# `ci/force-ci-bump-version.sh`
workflow_dispatch:

jobs:
bump_version:
runs-on: ubuntu-latest
Expand Down
16 changes: 16 additions & 0 deletions ci/force-ci-bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if [ -z "$PERSONAL_ACCESS_TOKEN" ]; then
echo "need to set \$PERSONAL_ACCESS_TOKEN to a github token"
exit 1
fi

exec curl --include --request POST \
https://api.github.com/repos/bytecodealliance/wasmtime/actions/workflows/bump-version.yml/dispatches \
--header "Authorization: token $PERSONAL_ACCESS_TOKEN" \
--data @- << EOF
{
"ref": "main"
}
EOF

0 comments on commit 5c3155f

Please sign in to comment.