Skip to content

Commit e5085a7

Browse files
committed
use local env vars
1 parent f4d2508 commit e5085a7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ jobs:
5757
- name: Get metadata
5858
id: get_metadata
5959
run: |
60-
echo "COMMIT_SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV
61-
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 }})"
60+
COMMIT_SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})
61+
COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s ${{ github.event.pull_request.head.sha }})
62+
echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
63+
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV
64+
echo "::set-output name=commit_message::$COMMIT_MESSAGE"
6365
# - name: "BRANCH: ${{ github.ref_name }}"
6466
# run: echo ""
65-
- name: "Current commit: ${{ env.COMMIT_SHA }} - ${{ env.COMMIT_MESSAGE }}"
67+
- name: "CURRENT COMMIT: ${{ env.COMMIT_SHA }} - ${{ env.COMMIT_MESSAGE }}"
6668
run: echo ""
6769
# - name: "SHA: ${{ github.sha }}"
6870
# run: echo ""
@@ -93,10 +95,10 @@ jobs:
9395
run: yarn install --ignore-engines
9496
outputs:
9597
dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }}
96-
commit_sha: ${{ steps.get_metadata.outputs.commit_sha }}
98+
commit_message: ${{ steps.get_metadata.outputs.commit_message }}
9799

98100
job_metadata:
99-
name: "Commit: ${{ needs.job_install_deps.outputs.commit_sha }}"
101+
name: "Commit: ${{ needs.job_install_deps.outputs.commit_message }}"
100102
# name: "Commit: ${{ needs.job_install_deps.outputs.commit_sha }} - ${{ env.COMMIT_MESSAGE }}"
101103
needs: job_install_deps
102104
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)