-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (58 loc) · 1.87 KB
/
update-addons-data.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
57
58
59
60
61
62
63
64
on:
workflow_dispatch:
inputs:
ref:
description: Reference on ScratchAddons/ScratchAddons
required: false
default: master
name: Addons Data Update
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- name: Generate token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout ScratchAddons/website-i18n
uses: actions/checkout@v3
with:
token: ${{ steps.generate-token.outputs.token }}
path: repo
- name: Checkout ScratchAddons/website-v2-script
uses: actions/checkout@v3
with:
repository: ScratchAddons/website-v2-script
path: script
- name: Checkout ScratchAddons/ScratchAddons
uses: actions/checkout@v3
with:
repository: ScratchAddons/ScratchAddons
path: sa
ref: ${{ github.event.inputs.ref }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Execute script
run: |
echo Running...
cd repo
bash ../script/sh/i18n-update-addons-data.sh
- name: Invoke workflow
# if: ${{ ! steps.script.outputs.commitSkipped }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Site Deployment
repo: ScratchAddons/website-v2
token: ${{ steps.generate-token.outputs.token }}
inputs: '{ "upload_repo": "false" }'