This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 197
51 lines (44 loc) · 1.76 KB
/
update_schema.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
name: Update Schema
on:
# Update goformation from the CloudFormation Resource Specification daily
schedule:
- cron: '0 0 * * *'
# Also allow manual execution from the GitHub Actions page
workflow_dispatch: {}
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.22.0'
- name: Update Schema
run: |
echo 'GENERATE_OUTPUT<<EOF' >> $GITHUB_ENV
echo 'This pull request was automatically generated, and includes updates to goformation based on new or updated resources in the [AWS CloudFormation Resource Specification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html).' >> $GITHUB_ENV
echo '' >> $GITHUB_ENV
echo 'Below is the output from `go generate`:' >> $GITHUB_ENV
echo '' >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
go generate | tee -a $GITHUB_ENV
echo '```' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Run Tests
run: go test ./...
- name: Generate Pull Request
uses: peter-evans/create-pull-request@c7f493a8000b8aeb17a1332e326ba76b57cb83eb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "CloudFormation Updates"
body: ${{ env.GENERATE_OUTPUT }}
commit-message: "fix(schema): CloudFormation Updates"
base: master
branch: auto-schema-update
delete-branch: true
committer: "Rúben Fonseca <[email protected]>"
author: "Rúben Fonseca <[email protected]>"
assignees: rubenfonseca