Skip to content

Commit

Permalink
sha from dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbutler committed Sep 4, 2024
1 parent 7ac5a25 commit 6f0406e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/release-approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ permissions:
statuses: write

jobs:
# on-failure:
# name: Check upstream workflow status
# if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure'
# runs-on: ubuntu-latest
# steps:
# - run: echo "The triggering workflow failed"

metadata:
name: Get PR metadata
runs-on: ubuntu-latest
Expand Down Expand Up @@ -88,6 +81,15 @@ jobs:
if: github.event_name == 'workflow_dispatch'
run: echo "is_release_branch=true" >> $GITHUB_OUTPUT

- name: "workflow_dispatch: Load commit_sha"
id: workflow_dispatch_load_commit_sha
if: github.event_name == 'workflow_dispatch'
# Gets the head commit of the PR using the gh CLI and jq
run: |
gh pr view ${{ steps.workflow_dispatch_load_pr.outputs.pr_num }} --json headRefOid --jq .headRefOid >
commit.txt
echo "commit_sha=$(cat commit.txt)" >> $GITHUB_OUTPUT
check_approval:
name: Check PR approval
if: needs.metadata.outputs.is_release_branch == 'true'
Expand Down

0 comments on commit 6f0406e

Please sign in to comment.