Add REVOL-E-TION (#945) #387
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Send URLs from Commit Message as Mastodon | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
toot: | |
runs-on: ubuntu-latest | |
if: "contains(github.event.head_commit.message, 'https')" | |
steps: | |
- name: Extract Line with URL as Toot | |
env: | |
default_hashtags: " #climate #sustainability #opensource #opensustain" | |
run: | | |
echo -e "${{ github.event.head_commit.message }}" >> toot | |
toot_message="$(cat toot | grep -m 1 https*)"$default_hashtags | |
echo "toot_message=$toot_message" >> $GITHUB_ENV | |
- name: Send toot to Mastodon | |
id: mastodon | |
uses: cbrgm/mastodon-github-action@v2 | |
with: | |
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} # access token | |
url: ${{ secrets.MASTODON_URL }} # https://example.social | |
message: ${{ env.toot_message }} |