forked from asyncapi/community
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.1 KB
/
twitter-a-main-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This workflow enables us to tweet together from the official AsyncAPI account :heart:
# Learn more from TWEET_TOGETHER instruction
on:
push:
branches:
- master
pull_request:
types: [opened, reopened, synchronize, edited, ready_for_review]
name: Twitter, together on AsyncAPI account!
jobs:
test_tweet:
name: Test and Preview Tweet
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tweet:
name: Tweet
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Tweet
uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_API_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_API_SECRET_KEY: ${{ secrets.TWITTER_CONSUMER_SECRET }}