Skip to content

Update AWS CloudFormation Template Release #33

Update AWS CloudFormation Template Release

Update AWS CloudFormation Template Release #33

name: Update AWS CloudFormation Template Release
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
# At 12am daily
- cron: "0 0 * * *"
# Workflow dispatch trigger allows manually running workflow
workflow_dispatch: {}
jobs:
meta-parent-policy-templates:
name: "Update AWS CloudFormation Template"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Speed up checkout by not fetching history
- uses: ruby/setup-ruby@v1
- name: Update AWS CloudFormation Template
working-directory: tools/cloudformation-template
run: |
ruby aws_cft_new_release.rb
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
commit-message: "Update AWS CloudFormation Template Release"
title: "Update AWS CloudFormation Template Release"
body: "Update AWS CloudFormation Template Release from GitHub Actions Workflow [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
branch: "task/update-aws-cloudformation-template-release"
delete-branch: true
labels: "automation"
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"