Skip to content

Commit 0423f38

Browse files
chore: run affected based on SHAs instead (#159)
1 parent bf3ba52 commit 0423f38

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/actions/setup/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ runs:
4242
- name: Install dependencies
4343
shell: bash
4444
run: pnpm install --frozen-lockfile
45+
46+
- name: Nx set SHAs
47+
uses: nrwl/[email protected]
48+
id: setSHAs
49+
with:
50+
main-branch-name: 'main'

.github/actions/test/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ runs:
1212

1313
- name: Lint
1414
shell: bash
15-
run: pnpx nx affected:lint --base=last-release --exclude="add-nx-to-qwik"
15+
run: pnpx nx affected:lint --base=${{ env.NX_BASE }} --head=HEAD --exclude="add-nx-to-qwik"
1616

1717
- name: Build
1818
shell: bash
19-
run: pnpx nx affected:build --base=last-release --exclude="add-nx-to-qwik"
19+
run: pnpx nx affected:build --base=${{ env.NX_BASE }} --head=HEAD --exclude="add-nx-to-qwik"
2020

2121
- name: Test
2222
shell: bash
23-
run: npx nx affected --target=test --base=last-release
23+
run: npx nx affected --target=test --base=${{ env.NX_BASE }} --head=HEAD
2424

2525
- name: E2E Tests
2626
shell: bash
27-
run: npx nx affected --target=e2e --base=last-release
27+
run: npx nx affected --target=e2e --base=${{ env.NX_BASE }} --head=HEAD
2828

2929
# - name: Codecov upload
3030
# uses: codecov/codecov-action@v2

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232

3333
steps:
3434
- uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0
3537
- name: Setup
3638
uses: ./.github/actions/setup
3739
with:

0 commit comments

Comments
 (0)