-
Notifications
You must be signed in to change notification settings - Fork 613
37 lines (33 loc) · 1.1 KB
/
deployminder.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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!'
})