Skip to content

Commit 0bc080a

Browse files
committed
ci: make commit sha consistent across workflows
1 parent 92d800a commit 0bc080a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/basic-test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Essential Test
22

33
on: workflow_call
44

5+
env:
6+
COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
7+
58
jobs:
69
lint:
710
runs-on: ubuntu-latest
@@ -18,7 +21,7 @@ jobs:
1821
- name: Archive lint report results
1922
uses: actions/upload-artifact@v4
2023
with:
21-
name: lint-report-${{ github.sha }}
24+
name: lint-report--${{ env.COMMIT_SHA }}
2225
path: reports
2326

2427
build:
@@ -32,13 +35,14 @@ jobs:
3235
- name: Archive build result
3336
uses: actions/upload-artifact@v4
3437
with:
35-
name: library-dist-${{ github.sha }}
38+
name: library-dist--${{ env.COMMIT_SHA }}
3639
path: dist
3740

3841
unit-test:
3942
strategy:
4043
matrix:
41-
os: [ubuntu-latest, windows-latest]
44+
os: [ubuntu-latest] # to have test faster
45+
# os: [ubuntu-latest, windows-latest]
4246
node-version: [20, 22]
4347
runs-on: ${{ matrix.os }}
4448
steps:
@@ -61,5 +65,5 @@ jobs:
6165
name: Archive coverage report
6266
uses: actions/upload-artifact@v4
6367
with:
64-
name: ngx-deploy-npm-coverage-report-${{ github.sha }}
68+
name: ngx-deploy-npm-coverage-report-${{ env.COMMIT_SHA }}
6569
path: coverage/packages/ngx-deploy-npm/lcov.info

0 commit comments

Comments
 (0)