generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 29
56 lines (48 loc) · 1.66 KB
/
sync-issues.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Sync Issues
on:
workflow_dispatch:
push:
branches:
- development
paths-ignore:
- "*.json"
- "**.json"
- "**/*.json"
schedule:
- cron: "15 * * * *" # every hour at minute 15 (github recommends to set such cron jobs not at the start of an hour)
jobs:
sync-issues:
name: Sync Issues
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.10.0"
- name: Yarn Install
run: yarn install --mode=skip-build
- name: Get GitHub App token
uses: tibdex/github-app-token@v1.7.0
id: get_installation_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Sync Issues
env:
DEVPOOL_GITHUB_API_TOKEN: ${{ steps.get_installation_token.outputs.token }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_KEY_SECRET: ${{ secrets.TWITTER_API_KEY_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
DEVPOOL_OWNER_NAME: ${{ github.repository_owner }}
DEVPOOL_REPO_NAME: "devpool-directory"
run: npx tsx index.ts
- name: Delete Unauthorized Issues
run: npx tsx ./scripts/delete-unauthorized-issues.ts
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
OWNER_REPO: ${{ github.repository }}
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}