@@ -19,14 +19,20 @@ jobs:
19
19
- name : Get PR branch
20
20
id : pr_branch
21
21
uses : xt0rted/pull-request-comment-branch@v2
22
+
23
+ - name : Set ref and sha as outputs
24
+ run : |
25
+ echo "head_ref=${{ steps.pr_branch.outputs.head_ref }}" >> $GITHUB_ENV
26
+ echo "head_sha=${{ steps.pr_branch.outputs.head_sha }}" >> $GITHUB_ENV
27
+
22
28
# Since `issue_comment` event workflow will not appear on the
23
29
# pull request page, we need to set the status of the job
24
30
# in order to attach it to the pull request itself
25
31
set-status-pending :
26
32
if : github.event.issue.pull_request && github.event.comment.body == '/test-acpi'
27
33
name : Set job status as pending
28
34
runs-on : ubuntu-latest
29
- needs : [ fetch-branch-name]
35
+ needs : fetch-branch-name
30
36
steps :
31
37
- name : Set job status as pending
32
38
uses : myrotvorets/set-commit-status-action@master
@@ -91,15 +97,11 @@ jobs:
91
97
echo "Launching Mock ACPI compose and running validator"
92
98
ansible-playbook -vv -i inventory.yaml mock_acpi_playbook.yaml -e "pr_number=${{ github.event.issue.number }}"
93
99
94
- - name : Set failure status if playbook failed
95
- if : steps.run-playbook.outcome == 'failure'
96
- run : echo "failure_status=true" >> $GITHUB_ENV
97
-
98
100
cleanup :
99
101
if : github.event.issue.pull_request && github.event.comment.body == '/test-acpi'
100
102
name : Cleanup
101
103
runs-on : ubuntu-latest
102
- needs : create -runner
104
+ needs : setup -runner
103
105
steps :
104
106
- name : delete runner
105
107
uses : rootfs/metal-delete-action@main
@@ -125,12 +127,11 @@ jobs:
125
127
if : github.event.issue.pull_request && github.event.comment.body == '/test-acpi'
126
128
name : Set final status
127
129
runs-on : ubuntu-latest
128
- needs : fetch-branch-name
129
130
steps :
130
131
- name : Set job status as ${{ job.status }}
131
132
uses : myrotvorets/set-commit-status-action@master
132
133
if : always()
133
134
with :
134
- sha : ${{ needs.fetch-branch-name.outputs .head_sha }}
135
+ sha : ${{ env .head_sha }}
135
136
token : ${{ secrets.GITHUB_TOKEN }}
136
137
status : ${{ job.status }}
0 commit comments