Skip to content

Publish-CloudFormation-foo #5

Publish-CloudFormation-foo

Publish-CloudFormation-foo #5

Workflow file for this run

name: Publish-CloudFormation-foo
on:
create:
push:
branches:
- main
- "[0-9]+.[0-9]+"
paths:
- deploy/cloudformation/*.yml
- scripts/publish_cft.sh
- .github/workflows/publish-cloudformation.yml
env:
GH_TOKEN: ${{ github.token }}
permissions:
actions: "write"
jobs:
publish_cloudformation_foo:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Check Branch and Event Type
run: |
if [[ ${{ github.event_name }} == 'create' ]]; then
if [[ ${{ github.ref }} =~ ^refs/heads/[0-9]+\.[0-9]+$ ]]; then
echo "Branch creation event and name matches the pattern. Proceeding with the workflow."
else
echo "Branch creation event, but the branch name doesn't match the pattern. Exiting the workflow."
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
fi
else
echo "Not a branch creation event. Proceeding with the workflow."
fi
- name: Publish CloudFormation
run: |
echo "Publishing CloudFormation"