Skip to content

Commit 4176fee

Browse files
authored
Update push.yml
1 parent 84e0e9c commit 4176fee

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

.github/workflows/push.yml

+24-11
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,31 @@ on:
33
branches:
44
- main
55
jobs:
6-
test_pr:
7-
runs-on: ubuntu-latest
6+
tf_apply:
7+
runs-on: self-hosted
88
steps:
9-
- uses: actions/checkout@v1
10-
# Find the PR associated with this push, if there is one.
11-
- uses: jwalton/gh-find-current-pr@v1
12-
id: findPr
9+
- uses: actions/checkout@v3
10+
11+
- uses: jwalton/gh-find-current-pr@v1.3.2
12+
id: find_pr
1313
with:
1414
# Can be "open", "closed", or "all". Defaults to "open".
1515
state: all
16-
# This will echo "Your PR is 7", or be skipped if there is no current PR.
17-
- run: echo "Your PR is ${PR}"
18-
if: success() && steps.findPr.outputs.number
19-
env:
20-
PR: ${{ steps.findPr.outputs.pr }}
16+
17+
- uses: actions/download-artifact@v3
18+
# if: success() && steps.findPr.outputs.number
19+
with:
20+
name: tfplan-${{ github.event.repository.name }}-test-pr-${{ steps.find_pr.outputs.pr }}
21+
path: ~/download/artifacts
22+
23+
- name: Display structure of downloaded files
24+
run: ls -R
25+
working-directory: ~/download/artifacts
26+
27+
- name: Terraform Init
28+
id: terraform_init
29+
run: terraform init
30+
31+
- name: Terraform Apply
32+
id: terraform_apply
33+
run: terraform apply -auto-approve ~/download/artifacts/myplan.tfplanh

0 commit comments

Comments
 (0)