File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Reminder
2+
3+ on :
4+ pull_request :
5+ types :
6+ - closed
7+ branches :
8+ - main
9+
10+ jobs :
11+ remind :
12+ if : github.event.pull_request.merged == true
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Check for changes in infra/
21+ id : check_changes
22+ run : |
23+ git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -q '^infra/'
24+ echo "has_infra_changes=$?" >> $GITHUB_OUTPUT
25+
26+ - name : Comment on PR
27+ if : steps.check_changes.outputs.has_infra_changes == '0'
28+ uses : actions/github-script@v7
29+ with :
30+ github-token : ${{secrets.GITHUB_TOKEN}}
31+ script : |
32+ github.rest.issues.createComment({
33+ issue_number: context.issue.number,
34+ owner: context.repo.owner,
35+ repo: context.repo.repo,
36+ body: 'Changes detected in the `infra/` directory. Don\'t forget to apply these changes in Terraform Cloud and/or Fastly!'
37+ })
You can’t perform that action at this time.
0 commit comments