Skip to content

Commit

Permalink
Fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha committed Aug 29, 2024
1 parent d513df9 commit 6c3fbe3
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/shared-terraform-chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ jobs:
with:
id: ${{ github.event.issue.number }}

- run: |-
echo "${{ steps.pr.outputs.json }}"
outputs:
base: ${{ fromJSON(steps.pr.outputs.json).base.sha }}
head: ${{ fromJSON(steps.pr.outputs.json).head.sha }}
head_sha: ${{ fromJSON(steps.pr.outputs.json).head.sha }}
found: ${{ steps.pr.outputs.found }}
json: ${{ steps.pr.outputs.json }}
number: ${{ steps.pr.outputs.number }}
Expand Down Expand Up @@ -67,7 +70,7 @@ jobs:
with:
args: >-
-action update_state
-ref "${{ needs.pr.outputs.head }}"
-ref "${{ needs.pr.outputs.head_sha }}"
-repo "${{ github.event.repository.name }}"
-state pending
-context "test/terratest"
Expand All @@ -92,13 +95,16 @@ jobs:
steps:
- name: "Checkout code for ChatOps"
uses: actions/checkout@v4
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ needs.pr.outputs.head_sha }}

- name: "Update GitHub Status for pending"
uses: docker://cloudposse/github-status-updater
with:
args: >-
-action update_state
-ref "${{ needs.pr.outputs.head }}"
-ref "${{ needs.pr.outputs.head_sha }}"
-repo "${{ github.event.repository.name }}"
-state pending
-context "test/terratest/${{ matrix.platform }}"
Expand Down Expand Up @@ -253,7 +259,7 @@ jobs:
with:
args: >-
-action update_state
-ref "${{ needs.pr.outputs.head }}"
-ref "${{ needs.pr.outputs.head_sha }}"
-repo "${{ github.event.repository.name }}"
-state failure
-context "test/terratest/${{ matrix.platform }}"
Expand All @@ -268,7 +274,7 @@ jobs:
with:
args: >-
-action update_state
-ref "${{ needs.pr.outputs.head }}"
-ref "${{ needs.pr.outputs.head_sha }}"
-repo "${{ github.event.repository.name }}"
-state success
-context "test/terratest/${{ matrix.platform }}"
Expand All @@ -284,7 +290,7 @@ jobs:
with:
args: >-
-action update_state
-ref "${{ needs.pr.outputs.head }}"
-ref "${{ needs.pr.outputs.head_sha }}"
-repo "${{ github.event.repository.name }}"
-state error
-context "test/terratest/${{ matrix.platform }}"
Expand Down Expand Up @@ -320,7 +326,7 @@ jobs:
with:
args: >-
-action update_state
-ref "${{ needs.pr.outputs.head }}"
-ref "${{ needs.pr.outputs.head_sha }}"
-repo "${{ github.event.repository.name }}"
-state ${{ steps.status.outputs.result }}
-context "test/terratest"
Expand Down

0 comments on commit 6c3fbe3

Please sign in to comment.