Skip to content

Commit

Permalink
ci: mastodonbot (#197)
Browse files Browse the repository at this point in the history
attempt to fix run logic - last time the post action did not run on
creating the release

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Workflow Updates**
  - Enhanced GitHub Actions workflow for Mastodon posting.
- Broadened conditions to trigger posting for pull requests with titles
containing 'release', 'v', or 'version'.
  - Improved error message clarity in the posting script.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
cmeesters authored Jan 22, 2025
1 parent 91b19c6 commit b901c5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/post_to_mastodon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Extract version from PR tag passed as environment variable
if [ -z "${PR_TITLE}" ]; then # apparently unset, workflow broken?
echo "Error: 'PR_TITLE' environemnt variable is not set."
echo "Error: 'PR_TITLE' environment variable is not set."
exit 1
fi
version="${PR_TITLE##* }"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post_to_mastodon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
post_to_mastodon:
if: |
github.event.pull_request.merged == true &&
(startsWith(github.event.pull_request.title, 'release') || contains(github.event.pull_request.title, ' v'))
(contains(github.event.pull_request.title, 'release') || contains(github.event.pull_request.title, ' v') || contains(github.event.pull_request.title, 'version'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit b901c5c

Please sign in to comment.