Skip to content

Source Update

Source Update #873

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
name: Source Update
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- name: Checkout ScratchAddons/website-i18n
uses: actions/checkout@v3
with:
path: repo
- name: Checkout ScratchAddons/website-v2-script
uses: actions/checkout@v3
with:
repository: ScratchAddons/website-v2-script
path: script
- name: Checkout ScratchAddons/website-v2
uses: actions/checkout@v3
with:
repository: ScratchAddons/website-v2
path: website
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache Node.js dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Execute script
id: script
run: |
echo Running...
cd repo
bash ../script/sh/i18n-update-source.sh
- name: Generate token
if: steps.script.outputs.has_new_commit == 'true'
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Invoke workflow
if: steps.script.outputs.has_new_commit == 'true'
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Source Upload
token: ${{ steps.generate-token.outputs.token }}