Skip to content

Commit f958bec

Browse files
committed
fix(ci): fix ci rules
1 parent 8431024 commit f958bec

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
build-docker-image:
1414
if: |
1515
(github.event_name == 'push' || github.event_name == 'pull_request') &&
16-
(contains(github.event.head_commit.modified, 'nix_test_env/Dockerfile') ||
17-
contains(github.event.head_commit.added, 'nix_test_env/Dockerfile') ||
18-
contains(github.event.head_commit.added, 'nix_test_env/docker_entrypoint.sh') ||
19-
contains(github.event.head_commit.modified, 'nix_test_env/docker_entrypoint.sh'))
16+
(contains(github.event.commits[0].modified, 'nix_test_env/Dockerfile') ||
17+
contains(github.event.commits[0].added, 'nix_test_env/Dockerfile') ||
18+
contains(github.event.commits[0].added, 'nix_test_env/docker_entrypoint.sh') ||
19+
contains(github.event.commits[0].modified, 'nix_test_env/docker_entrypoint.sh'))
2020
2121
runs-on: ubuntu-latest
2222
outputs:
@@ -49,8 +49,8 @@ jobs:
4949
- name: Debug event
5050
run: |
5151
echo "Event name: ${{ github.event_name }}"
52-
echo "Modified files: ${{ github.event.head_commit.modified }}"
53-
echo "Added files: ${{ github.event.head_commit.added }}"
52+
echo "Modified files: ${{ github.event.commits[0].modified }}"
53+
echo "Added files: ${{ github.event.commits[0].added }}"
5454
5555
tests:
5656
runs-on: ubuntu-latest
@@ -63,13 +63,11 @@ jobs:
6363
uses: actions/checkout@v4
6464

6565
- name: Download Docker image artifact
66-
if: needs.build-docker-image.outputs.build_ran == 'true'
6766
uses: actions/download-artifact@v4
6867
with:
6968
name: nix-docker-image
7069

7170
- name: Load Docker image
72-
if: needs.build-docker-image.outputs.build_ran == 'true'
7371
run: |
7472
docker load -i nix-image.tar
7573

0 commit comments

Comments
 (0)