Skip to content

Commit

Permalink
Echo github.sha and github.event.head_commit.id to help resolve deplo… (
Browse files Browse the repository at this point in the history
#20036)

* Echo github.sha and github.event.head_commit.id to help resolve deploying incorrect gha

* pull request commit id

* merge_commit_sha

* merge_commit_sha build

* another commit

* head commit

* github.event.workflow_run.head_commit.id
  • Loading branch information
RachalCassity authored Dec 26, 2024
1 parent c28ee05 commit 781541c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ on:
permissions:
contents: read
jobs:
compare_sha:
runs-on: ubuntu-latest
name: Compare sha
steps:
- name: Compare commit ids
run: |
echo "github.sha: ${{ github.sha }}"
echo "github.event.push.head_commit.id: ${{ github.event.push.head_commit.id }}"
echo "github.event.pull_request.merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}"
echo "github.event.head_commit.id: ${{ github.event.head_commit.id }}"
echo "github.event.workflow_run.head_commit.id: ${{ github.event.workflow_run.head_commit.id }}"
build_and_push:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build and Push
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ permissions:
contents: read
checks: write
jobs:
compare_sha:
runs-on: ubuntu-latest
name: Compare sha
steps:
- name: Compare commit ids
run: |
echo "github.sha: ${{ github.sha }}"
echo "github.event.push.head_commit.id: ${{ github.event.push.head_commit.id }}"
echo "github.event.pull_request.merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}"
echo "github.event.head_commit.id: ${{ github.event.head_commit.id }}"
linting_and_security:
name: Linting and Security
env:
Expand Down

0 comments on commit 781541c

Please sign in to comment.