From 69629d2479ba8fcb204e6aac0c00d295f9693539 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Thu, 19 Nov 2020 12:56:47 -0800 Subject: [PATCH 1/3] create-pull-request github action --- .github/workflows/template-schema-updater.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/template-schema-updater.yaml diff --git a/.github/workflows/template-schema-updater.yaml b/.github/workflows/template-schema-updater.yaml new file mode 100644 index 00000000..250dafa1 --- /dev/null +++ b/.github/workflows/template-schema-updater.yaml @@ -0,0 +1,10 @@ +on: + schedule: + - cron: '* * * * *' +jobs: + job: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: touch hello-world.txt + - uses: peter-evans/create-pull-request@v3 From bdf417ce74f1939ff8d2ee3d15e4dda6c51fc955 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Thu, 19 Nov 2020 13:08:32 -0800 Subject: [PATCH 2/3] cron schedule every 5 minutes The shortest interval you can run scheduled workflows is once every 5 minutes. https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onschedule --- .github/workflows/template-schema-updater.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template-schema-updater.yaml b/.github/workflows/template-schema-updater.yaml index 250dafa1..69d5cf34 100644 --- a/.github/workflows/template-schema-updater.yaml +++ b/.github/workflows/template-schema-updater.yaml @@ -1,6 +1,6 @@ on: schedule: - - cron: '* * * * *' + - cron: '*/5 * * * *' jobs: job: runs-on: ubuntu-latest From 44f4c21a4a4549d22ced6bf82d35dfce82486344 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Thu, 19 Nov 2020 13:41:44 -0800 Subject: [PATCH 3/3] testing template schema upgrade action --- .../workflows/template-schema-updater.yaml | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/template-schema-updater.yaml b/.github/workflows/template-schema-updater.yaml index 69d5cf34..64e1a2c6 100644 --- a/.github/workflows/template-schema-updater.yaml +++ b/.github/workflows/template-schema-updater.yaml @@ -1,10 +1,38 @@ on: - schedule: - - cron: '*/5 * * * *' + schedule: + - cron: '*/5 * * * *' jobs: job: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: touch hello-world.txt + - uses: actions/checkout@v2 + with: + repository: aws-cloudformation/aws-cloudformation-template-schema + path: aws-cloudformation-template-schema + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + cd aws-cloudformation-template-schema + mvn package + echo 'settings: + regions: [us-east-1] + output: out' > cfg.yml + java -jar target/aws-cloudformation-template-schema-1.0-SNAPSHOT-jar-with-dependencies.jar --config-file cfg.yml + mv out/us-east-1/all-spec.json ../schema/all-spec.json + cd .. + rm -rf aws-cloudformation-template-schema - uses: peter-evans/create-pull-request@v3 + with: + commit-message: | + CloudFormation Template Schema upgrade + https://github.com/aws-cloudformation/aws-cloudformation-template-schema/issues/32 + https://github.com/aws-cloudformation/aws-cloudformation-template-schema/blob/master/docs/tool/instructions.md + as described in https://github.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/pull/76 + delete-branch: true + title: CloudFormation Template Schema upgrade + body: | + https://github.com/aws-cloudformation/aws-cloudformation-template-schema/issues/32 + https://github.com/aws-cloudformation/aws-cloudformation-template-schema/blob/master/docs/tool/instructions.md + as described in https://github.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/pull/76