Skip to content

Commit 7565aa0

Browse files
committed
use commit label everywhere
1 parent b61a512 commit 7565aa0

File tree

1 file changed

+24
-52
lines changed

1 file changed

+24
-52
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ jobs:
5959
echo "::set-output name=commit_sha::$COMMIT_SHA"
6060
echo "::set-output name=commit_message::$COMMIT_MESSAGE"
6161
outputs:
62-
commit_sha: ${{ steps.get_metadata.outputs.commit_sha }}
63-
commit_message: ${{ steps.get_metadata.outputs.commit_message }}
62+
# commit_sha: ${{ steps.get_metadata.outputs.commit_sha }}
63+
# commit_message: ${{ steps.get_metadata.outputs.commit_message }}
6464
commit_label: "${{ steps.get_metadata.outputs.commit_sha }}: ${{ steps.get_metadata.outputs.commit_message }}"
6565

6666
job_install_deps:
@@ -69,38 +69,10 @@ jobs:
6969
runs-on: ubuntu-latest
7070
timeout-minutes: 15
7171
steps:
72-
# - name: Echo data
73-
# run: |
74-
# echo ${{ needs.job_get_metadata.outputs.commit_sha }} - ${{ needs.job_get_metadata.outputs.commit_message }}
7572
- name: "Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})"
7673
uses: actions/checkout@v2
7774
with:
7875
ref: ${{ env.HEAD_COMMIT }}
79-
# # - name: Get PR head SHA
80-
# # run: echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
81-
# # - name: Setup tmate session
82-
# # uses: mxschmitt/action-tmate@v3
83-
# - name: Get metadata
84-
# id: get_metadata
85-
# run: |
86-
# COMMIT_SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})
87-
# COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s ${{ github.event.pull_request.head.sha }})
88-
# echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
89-
# echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV
90-
# echo "::set-output name=commit_message::$COMMIT_MESSAGE"
91-
# # - name: "BRANCH: ${{ github.ref_name }}"
92-
# # run: echo ""
93-
# - name: "CURRENT COMMIT: ${{ env.COMMIT_SHA }} - ${{ env.COMMIT_MESSAGE }}"
94-
# run: echo ""
95-
# - name: "SHA: ${{ github.sha }}"
96-
# run: echo ""
97-
# - name: "GITHUB_HEAD_REF: ${{env.GITHUB_HEAD_REF}}"
98-
# run: echo ""
99-
# - name: Print env
100-
# run: env | sort
101-
# - name: Read variable
102-
# run: echo "COMMIT_MESSAGE is ${{ env.COMMIT_MESSAGE }}"
103-
10476
- name: Set up Node
10577
uses: actions/setup-node@v1
10678
with:
@@ -129,7 +101,7 @@ jobs:
129101
runs-on: ubuntu-latest
130102
timeout-minutes: 20
131103
steps:
132-
- name: "Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})"
104+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
133105
uses: actions/checkout@v2
134106
with:
135107
ref: ${{ env.HEAD_COMMIT }}
@@ -168,10 +140,10 @@ jobs:
168140
name: Pack and Upload AWS Lambda Layer
169141
# only upload the zipped layer file if we're about to release
170142
# if: startsWith(github.ref, 'refs/heads/release/')
171-
needs: job_build
143+
needs: [job_get_metadata, job_build]
172144
runs-on: ubuntu-latest
173145
steps:
174-
- name: Check out current commit (${{ env.HEAD_COMMIT }} - ${{ github.event.head_commit.message }})
146+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
175147
uses: actions/checkout@v2
176148
with:
177149
ref: ${{ env.HEAD_COMMIT }}
@@ -209,13 +181,13 @@ jobs:
209181

210182
# job_size_check:
211183
# name: Size Check
212-
# needs: job_build
184+
# needs: [job_get_metadata, job_build]
213185
# timeout-minutes: 15
214186
# runs-on: ubuntu-latest
215187
# # Size Check will error out outside of the context of a PR
216188
# if: ${{ github.event_name == 'pull_request' }}
217189
# steps:
218-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
190+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
219191
# uses: actions/checkout@v2
220192
# with:
221193
# ref: ${{ env.HEAD_COMMIT }}
@@ -243,11 +215,11 @@ jobs:
243215
#
244216
# job_lint:
245217
# name: Lint
246-
# needs: job_build
218+
# needs: [job_get_metadata, job_build]
247219
# timeout-minutes: 10
248220
# runs-on: ubuntu-latest
249221
# steps:
250-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
222+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
251223
# uses: actions/checkout@v2
252224
# with:
253225
# ref: ${{ env.HEAD_COMMIT }}
@@ -270,11 +242,11 @@ jobs:
270242
#
271243
# job_circular_dep_check:
272244
# name: Circular Dependency Check
273-
# needs: job_build
245+
# needs: [job_get_metadata, job_build]
274246
# timeout-minutes: 10
275247
# runs-on: ubuntu-latest
276248
# steps:
277-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
249+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
278250
# uses: actions/checkout@v2
279251
# with:
280252
# ref: ${{ env.HEAD_COMMIT }}
@@ -297,7 +269,7 @@ jobs:
297269
#
298270
# job_artifacts:
299271
# name: Upload Artifacts
300-
# needs: job_build
272+
# needs: [job_get_metadata, job_build]
301273
# runs-on: ubuntu-latest
302274
# # Build artifacts are only needed for releasing workflow.
303275
# if: startsWith(github.ref, 'refs/heads/release/')
@@ -334,15 +306,15 @@ jobs:
334306
#
335307
# job_unit_test:
336308
# name: Test (Node ${{ matrix.node }})
337-
# needs: job_build
309+
# needs: [job_get_metadata, job_build]
338310
# continue-on-error: true
339311
# timeout-minutes: 30
340312
# runs-on: ubuntu-latest
341313
# strategy:
342314
# matrix:
343315
# node: [8, 10, 12, 14, 16, 18]
344316
# steps:
345-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
317+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
346318
# uses: actions/checkout@v2
347319
# with:
348320
# ref: ${{ env.HEAD_COMMIT }}
@@ -371,15 +343,15 @@ jobs:
371343
#
372344
# job_nextjs_integration_test:
373345
# name: Test @sentry/nextjs on (Node ${{ matrix.node }})
374-
# needs: job_build
346+
# needs: [job_get_metadata, job_build]
375347
# continue-on-error: true
376348
# timeout-minutes: 30
377349
# runs-on: ubuntu-latest
378350
# strategy:
379351
# matrix:
380352
# node: [10, 12, 14, 16, 18]
381353
# steps:
382-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
354+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
383355
# uses: actions/checkout@v2
384356
# with:
385357
# ref: ${{ env.HEAD_COMMIT }}
@@ -408,12 +380,12 @@ jobs:
408380
# # separate job allows them to run in parallel with the other tests.
409381
# job_ember_tests:
410382
# name: Test @sentry/ember
411-
# needs: job_build
383+
# needs: [job_get_metadata, job_build]
412384
# continue-on-error: true
413385
# timeout-minutes: 30
414386
# runs-on: ubuntu-latest
415387
# steps:
416-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
388+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
417389
# uses: actions/checkout@v2
418390
# with:
419391
# ref: ${{ env.HEAD_COMMIT }}
@@ -447,7 +419,7 @@ jobs:
447419
#
448420
# job_browser_playwright_tests:
449421
# name: Playwright - ${{ (matrix.tracing_only && 'Browser + Tracing') || 'Browser' }} (${{ matrix.bundle }})
450-
# needs: job_build
422+
# needs: [job_get_metadata, job_build]
451423
# runs-on: ubuntu-latest
452424
# strategy:
453425
# matrix:
@@ -469,7 +441,7 @@ jobs:
469441
# - bundle: cjs
470442
# tracing_only: false
471443
# steps:
472-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
444+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
473445
# uses: actions/checkout@v2
474446
# with:
475447
# ref: ${{ env.HEAD_COMMIT }}
@@ -498,7 +470,7 @@ jobs:
498470
#
499471
# job_browser_integration_tests:
500472
# name: Old Browser Integration Tests (${{ matrix.browser }})
501-
# needs: job_build
473+
# needs: [job_get_metadata, job_build]
502474
# runs-on: ubuntu-latest
503475
# timeout-minutes: 10
504476
# continue-on-error: true
@@ -509,7 +481,7 @@ jobs:
509481
# - FirefoxHeadless
510482
# - WebkitHeadless
511483
# steps:
512-
# - name: Check out current commit (${{ env.HEAD_COMMIT }})
484+
# - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
513485
# uses: actions/checkout@v2
514486
# with:
515487
# ref: ${{ env.HEAD_COMMIT }}
@@ -537,7 +509,7 @@ jobs:
537509
#
538510
# job_browser_build_tests:
539511
# name: Browser Build Tests
540-
# needs: job_build
512+
# needs: [job_get_metadata, job_build]
541513
# runs-on: ubuntu-latest
542514
# timeout-minutes: 5
543515
# continue-on-error: true
@@ -571,7 +543,7 @@ jobs:
571543
#
572544
# job_node_integration_tests:
573545
# name: Node SDK Integration Tests (${{ matrix.node }})
574-
# needs: job_build
546+
# needs: [job_get_metadata, job_build]
575547
# runs-on: ubuntu-latest
576548
# timeout-minutes: 10
577549
# continue-on-error: true

0 commit comments

Comments
 (0)