Update formats #110
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: 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 |