Billboard Rounds - Create PR to update latest round #268
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: Billboard Rounds - Create PR to update latest round | |
on: | |
# Run this workflow whenever a new commit is pushed to main. | |
# push: {branches: [main]} | |
# Run this workflow once per day, at 10:15 UTC | |
schedule: [{cron: "15 10 * * *"}] | |
# Run this workflow when triggered manually in GitHub’s UI. | |
workflow_dispatch: {} | |
jobs: | |
ci-round-assets: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '^18' | |
- name: Install Dependencies | |
run: yarn add --ignore-scripts @aws-sdk/client-s3 ## the only dependency for ./bin/sync-up-latest-round.mjs | |
- name: Sync up Latest Round | |
id: sync-up-latest-round | |
run: "./bin/sync-up-latest-round.mjs | tee message.log" | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ap-southeast-1 | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
## token: ${{ secrets.BILLBOARD_GITHUB_TOKEN }} | |
commit-message: auto checkin latest Round assets as Preview | |
base: main | |
signoff: false | |
branch: auto/round-assets | |
delete-branch: true | |
# path: public/static | |
add-paths: public/static | |
title: check in latest Round${{steps.sync-up-latest-round.outputs.round_id}} Assets | |
body-path: message.log | |
body: | | |
Update preview Assets | |
- Updated with *today's* date | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: assets, automated pr | |
draft: true |