Skip to content

Commit f4d2508

Browse files
committed
try outputting commit sha
1 parent 13d41bd commit f4d2508

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ jobs:
5555
# - name: Setup tmate session
5656
# uses: mxschmitt/action-tmate@v3
5757
- name: Get metadata
58+
id: get_metadata
5859
run: |
5960
echo "COMMIT_SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV
6061
echo "COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV
62+
echo "::set-output name=commit_sha::$(git log -n 1 --pretty=format:%s ${{ github.event.pull_request.head.sha }})"
6163
# - name: "BRANCH: ${{ github.ref_name }}"
6264
# run: echo ""
6365
- name: "Current commit: ${{ env.COMMIT_SHA }} - ${{ env.COMMIT_MESSAGE }}"
@@ -91,9 +93,12 @@ jobs:
9193
run: yarn install --ignore-engines
9294
outputs:
9395
dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }}
96+
commit_sha: ${{ steps.get_metadata.outputs.commit_sha }}
9497

9598
job_metadata:
96-
name: "Commit: ${{ env.COMMIT_SHA }} - ${{ env.COMMIT_MESSAGE }}"
99+
name: "Commit: ${{ needs.job_install_deps.outputs.commit_sha }}"
100+
# name: "Commit: ${{ needs.job_install_deps.outputs.commit_sha }} - ${{ env.COMMIT_MESSAGE }}"
101+
needs: job_install_deps
97102
runs-on: ubuntu-latest
98103
steps:
99104
- name: This is a dummy job, just to display metadata

0 commit comments

Comments
 (0)