From 0c4679c64173b653bab6909c912797fd6768fd12 Mon Sep 17 00:00:00 2001 From: kcantrel Date: Tue, 20 Aug 2024 13:23:23 -0500 Subject: [PATCH] Create update-CloudformationTemplate.yml --- .../update-CloudformationTemplate.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/update-CloudformationTemplate.yml diff --git a/.github/workflows/update-CloudformationTemplate.yml b/.github/workflows/update-CloudformationTemplate.yml new file mode 100644 index 0000000..61cc0e6 --- /dev/null +++ b/.github/workflows/update-CloudformationTemplate.yml @@ -0,0 +1,37 @@ +--- +# Copyright (c) NetApp, Inc. +# SPDX-License-Identifier: Apache-2.0 + +name: "Update Cloudformation Template" + +on: + pull_request: + paths: + - 'Monitoring/monitor-ontap-services/monitor_ontap_services.py' + push: + paths: + - 'Monitoring/monitor-ontap-services/monitor_ontap_services.py' + branches: + - main + +jobs: + update-Cloudformation-Template: + runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + + steps: + - name: Checkout pull request + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Update the Cloudformation Template + shell: bash + working-directory: Monitoring/monitor-ontap-services + run: ./updateMonOntapServiceCFTemplate + + - name: Commit the changes + uses: stefanzweifel/git-auto-commit-action@v5