-
Notifications
You must be signed in to change notification settings - Fork 8
33 lines (33 loc) · 1.09 KB
/
twitter-together.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
on: [push, pull_request_target]
name: Twitter, together!
jobs:
preview:
name: Preview
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target'
permissions:
pull-requests: write
steps:
- name: checkout pull request
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Validate Tweets
uses: IstoraMandiri/twitter-together@etc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tweet:
name: Tweet
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: checkout main
uses: actions/checkout@v3
- name: Tweet
uses: IstoraMandiri/twitter-together@etc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_SECRET_KEY: ${{ secrets.TWITTER_API_SECRET_KEY }}