Migrate Templates #235
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@0080882f6c36860b6ba35c610c98ce87d4e2f26f | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
token: ${{ secrets.GOOGLEFORCREATORS_BOT_TOKEN }} | |
- name: Setup Node | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af | |
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@5e914681df9dc83aa4e4905692ca88beb2f9e91f | |
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 |