Skip to content

Migrate Templates

Migrate Templates #277

name: Migrate Templates
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 1'
env:
GIT_AUTHOR_EMAIL: 94923726+googleforcreators-bot@users.noreply.github.com
GIT_AUTHOR_NAME: googleforcreators-bot
GIT_COMMITTER_EMAIL: 94923726+googleforcreators-bot@users.noreply.github.com
GIT_COMMITTER_NAME: googleforcreators-bot
permissions:
contents: read
jobs:
update-template:
name: Migrate templates and text sets
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
token: ${{ secrets.GOOGLEFORCREATORS_BOT_TOKEN }}
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Update story data (templates, text sets, FTUE)
run: npm run workflow:migrate
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
token: ${{ secrets.GOOGLEFORCREATORS_BOT_TOKEN }}
commit-message: Migrate templates and text sets to latest version
title: Migrate templates and text sets
body: Update templates and text sets after running through migration
branch: update/templates
labels: Dependencies