Skip to content

Addons Data Update

Addons Data Update #45

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@v2
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout ScratchAddons/website-i18n
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
path: repo
- name: Checkout ScratchAddons/website-v2-script
uses: actions/checkout@v4
with:
repository: ScratchAddons/website-v2-script
path: script
- name: Checkout ScratchAddons/ScratchAddons
uses: actions/checkout@v4
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" }'