Skip to content

Commit b901c5c

Browse files
authored
ci: mastodonbot (#197)
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 -->
1 parent 91b19c6 commit b901c5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/post_to_mastodon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Extract version from PR tag passed as environment variable
44
if [ -z "${PR_TITLE}" ]; then # apparently unset, workflow broken?
5-
echo "Error: 'PR_TITLE' environemnt variable is not set."
5+
echo "Error: 'PR_TITLE' environment variable is not set."
66
exit 1
77
fi
88
version="${PR_TITLE##* }"

.github/workflows/post_to_mastodon.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
post_to_mastodon:
1515
if: |
1616
github.event.pull_request.merged == true &&
17-
(startsWith(github.event.pull_request.title, 'release') || contains(github.event.pull_request.title, ' v'))
17+
(contains(github.event.pull_request.title, 'release') || contains(github.event.pull_request.title, ' v') || contains(github.event.pull_request.title, 'version'))
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)