-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.82 KB
/
checkin-assets.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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