-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.95 KB
/
update-formats.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
name: Update formats
on:
workflow_dispatch:
branches:
- main
schedule:
- cron: '0 20 * * 0'
jobs:
updateFormats:
name: Update formats
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Update formats
run: npm run update-formats
- name: Get date
id: get-date
run: echo "::set-output name=DATE::$(/bin/date -u "+%F")"
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ steps.generate-token.outputs.token }}
base: ${{ steps.branches.outputs.BASE }}
branch: feature/scheduled-formats-update
delete-branch: true
commit-message: 'fix(formats): update address formats to ${{ steps.get-date.outputs.DATE }}'
title: Update address formats to ${{ steps.get-date.outputs.DATE }}
body: |
Formats updated to latest state from ${{ steps.get-date.outputs.DATE }}.
This PR is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
using the `.github/workflows/update-formats.yml` workflow.
labels: |
Type: enhancement
reviewers: dasprid