-
-
Notifications
You must be signed in to change notification settings - Fork 159
41 lines (36 loc) · 1005 Bytes
/
pull_request_review.yaml
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
38
39
40
41
name: Test pull_request_review event
on:
- pull_request_review
jobs:
apply:
runs-on: ubuntu-24.04
name: Apply approved changes on pull_request_review
permissions:
contents: read
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Plan
uses: ./terraform-plan
with:
label: pull_request_review
path: tests/workflows/pull_request_review
- name: Apply
uses: ./terraform-apply
id: output
with:
label: pull_request_review
path: tests/workflows/pull_request_review
- name: Verify outputs
env:
OUTPUT_STRING: ${{ steps.output.outputs.output_string }}
run: |
if [[ "$OUTPUT_STRING" != "the_string" ]]; then
echo "::error:: output s not set correctly"
exit 1
fi