-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (62 loc) · 1.98 KB
/
update-constants.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
69
70
71
72
73
74
75
76
77
78
name: update constants
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
checkout_ref:
description: branch, tag or commit sha
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.checkout_ref }}
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn --immutable
- name: Generate regions
run: yarn build:regions
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Generate ec2-types
run: yarn build:ec2-types
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Generate ec2-info
run: yarn build:ec2-info
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build
run: yarn build
- name: Check linting
run: yarn lint
- name: Check types
run: yarn types
- name: Run tests and update snapshots
run: yarn test -u
- name: Log git diffs
run: git diff
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
commit-message: 'fix: update constants'
title: 'fix: update constants'
branch: ec2-types/patch
labels: automerge
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash