Skip to content

Commit 302e8b5

Browse files
authored
chore(.github): skip free-disk-space action if there are no changed files (#5536)
skip free-disk-space action Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent 33215d6 commit 302e8b5

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

.github/workflows/docker-build-and-push-arm64.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
with:
3030
token: ${{ secrets.GITHUB_TOKEN }}
3131

32-
- name: Free disk space
33-
uses: ./.github/actions/free-disk-space
34-
3532
- name: Get changed files
3633
id: changed-files
3734
uses: tj-actions/changed-files@v45
@@ -45,6 +42,12 @@ jobs:
4542
ansible/**
4643
docker/**
4744
45+
- name: Free disk space
46+
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
47+
github.event_name == 'workflow_dispatch' ||
48+
(github.event_name == 'push' && github.ref_type == 'tag') }}
49+
uses: ./.github/actions/free-disk-space
50+
4851
- name: Build 'Autoware' without CUDA
4952
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
5053
github.event_name == 'workflow_dispatch' ||
@@ -81,9 +84,6 @@ jobs:
8184
with:
8285
token: ${{ secrets.GITHUB_TOKEN }}
8386

84-
- name: Free disk space
85-
uses: ./.github/actions/free-disk-space
86-
8787
- name: Get changed files
8888
id: changed-files
8989
uses: tj-actions/changed-files@v45
@@ -97,6 +97,12 @@ jobs:
9797
ansible/**
9898
docker/**
9999
100+
- name: Free disk space
101+
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
102+
github.event_name == 'workflow_dispatch' ||
103+
(github.event_name == 'push' && github.ref_type == 'tag') }}
104+
uses: ./.github/actions/free-disk-space
105+
100106
- name: Build 'Autoware' with CUDA
101107
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
102108
github.event_name == 'workflow_dispatch' ||

.github/workflows/docker-build-and-push.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
with:
2525
token: ${{ secrets.GITHUB_TOKEN }}
2626

27-
- name: Free disk space
28-
uses: ./.github/actions/free-disk-space
29-
3027
- name: Get changed files
3128
id: changed-files
3229
uses: tj-actions/changed-files@v45
@@ -40,6 +37,12 @@ jobs:
4037
ansible/**
4138
docker/**
4239
40+
- name: Free disk space
41+
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
42+
github.event_name == 'workflow_dispatch' ||
43+
(github.event_name == 'push' && github.ref_type == 'tag') }}
44+
uses: ./.github/actions/free-disk-space
45+
4346
- name: Build 'Autoware' without CUDA
4447
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
4548
github.event_name == 'workflow_dispatch' ||
@@ -76,9 +79,6 @@ jobs:
7679
with:
7780
token: ${{ secrets.GITHUB_TOKEN }}
7881

79-
- name: Free disk space
80-
uses: ./.github/actions/free-disk-space
81-
8282
- name: Get changed files
8383
id: changed-files
8484
uses: tj-actions/changed-files@v45
@@ -92,6 +92,12 @@ jobs:
9292
ansible/**
9393
docker/**
9494
95+
- name: Free disk space
96+
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
97+
github.event_name == 'workflow_dispatch' ||
98+
(github.event_name == 'push' && github.ref_type == 'tag') }}
99+
uses: ./.github/actions/free-disk-space
100+
95101
- name: Build 'Autoware' with CUDA
96102
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
97103
github.event_name == 'workflow_dispatch' ||

0 commit comments

Comments
 (0)