Skip to content

Commit

Permalink
try new action to get sha
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Aug 12, 2024
1 parent 00e03fb commit df4a981
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/test-pr-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,24 @@ jobs:
with:
pr: ${{ github.event.inputs.pr }}

- name: Get SHA of checked-out PR
id: get-sha
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
# - name: Get SHA of checked-out PR
# id: get-sha
# run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- id: get-sha
uses: hudsonm62/short-sha@v1

# - name: Get SHA of checked-out PR
# id: get-sha-2
# uses: actions/github-script@v6
# with:
# script: |
# const sha = await github.rest.repos.getCommit({
# owner: context.repo.owner,
# repo: context.repo.repo,
# ref: context.sha
# });
# return { sha: sha.data.sha };

- name: CI job status tracker (commit ${{ steps.get-sha.outputs.sha }})
uses: aaronsteers/action-job-status@feat/allow-job-name-override
Expand Down

0 comments on commit df4a981

Please sign in to comment.