Skip to content

Commit

Permalink
ci: add reminder to deploy TF cloud changes (#2625)
Browse files Browse the repository at this point in the history
* ci: add reminder to deploy TF cloud changes

* ci: update checkout version

* ci: fastly
  • Loading branch information
JacobCoffee authored Sep 30, 2024
1 parent 2154a90 commit 020753a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deployminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Reminder

on:
pull_request:
types:
- closed
branches:
- main

jobs:
remind:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for changes in infra/
id: check_changes
run: |
git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -q '^infra/'
echo "has_infra_changes=$?" >> $GITHUB_OUTPUT
- name: Comment on PR
if: steps.check_changes.outputs.has_infra_changes == '0'
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Changes detected in the `infra/` directory. Don\'t forget to apply these changes in Terraform Cloud and/or Fastly!'
})

0 comments on commit 020753a

Please sign in to comment.