Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sleepypioneer/actions_to_celebrate
https://github.com/sleepypioneer/actions_to_celebrate
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sleepypioneer/actions_to_celebrate
- Owner: sleepypioneer
- Created: 2021-02-28T22:50:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-02T20:17:05.000Z (almost 4 years ago)
- Last Synced: 2023-03-10T08:38:21.655Z (almost 2 years ago)
- Language: Python
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎬 Action! Celebrate with GitHub Actions workflow and Twitter
Use this action to send a tweet celebrating your and others progress using a GitHub actions workflow.## Twitter Application Setup 🐦
First, you'll need to create a Twitter application if you haven't already. This will allow you to programmatically authenticate to the Twitter API and send a tweet.If you haven't already, visit [developer.twitter.com/apps](https://developer.twitter.com/en/portal/projects-and-apps) and create a Twitter application. Then create keys and tokens to use for authentication.
By default, app's access level is read-only. To send out tweets, it requires write permission.
Go to: ´Permissions tab -> What type of access does your application need? -> Choose Read and Write -> Update settings´.## Secret Configuration 🤫
Configure the authentication keys and tokens for your Twitter app as secrets in your github repository. If you are following this example we use:
* `TWITTER_CONSUMER_API_KEY`
* `TWITTER_CONSUMER_API_SECRET`
* `TWITTER_ACCESS_TOKEN`
* `TWITTER_ACCESS_TOKEN_SECRET`## Workflow Usage ⚙️
Configure your workflow to use sleepypioneer/tweet-on-pr-action@master.Provide the authentication keys and tokens for your Twitter app as the consumer-key, consumer-secret, access-token, and access-token-secret inputs.
Example:
``` yml
name: example
on: [pull_request]
jobs:
comment:
name: Add checkout and pull commands
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: sleepypioneer/actions_to_celebrate@main
with:
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
```Now whenever you or someone else creates a pull request on your repository, GitHub Actions will tweet on your behalf. The format of the Tweet will be:
```text
Congratulations {author} on opening a pull request on the repository: {repo}!! Time to celebrate!!
```