diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 7242629c59..167c1d7ebf 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -29,9 +29,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Free disk space - uses: ./.github/actions/free-disk-space - - name: Get changed files id: changed-files uses: tj-actions/changed-files@v45 @@ -45,6 +42,12 @@ jobs: ansible/** docker/** + - name: Free disk space + if: ${{ steps.changed-files.outputs.any_changed == 'true' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref_type == 'tag') }} + uses: ./.github/actions/free-disk-space + - name: Build 'Autoware' without CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || @@ -81,9 +84,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Free disk space - uses: ./.github/actions/free-disk-space - - name: Get changed files id: changed-files uses: tj-actions/changed-files@v45 @@ -97,6 +97,12 @@ jobs: ansible/** docker/** + - name: Free disk space + if: ${{ steps.changed-files.outputs.any_changed == 'true' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref_type == 'tag') }} + uses: ./.github/actions/free-disk-space + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 280fe2efbb..567678bde3 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -24,9 +24,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Free disk space - uses: ./.github/actions/free-disk-space - - name: Get changed files id: changed-files uses: tj-actions/changed-files@v45 @@ -40,6 +37,12 @@ jobs: ansible/** docker/** + - name: Free disk space + if: ${{ steps.changed-files.outputs.any_changed == 'true' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref_type == 'tag') }} + uses: ./.github/actions/free-disk-space + - name: Build 'Autoware' without CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || @@ -76,9 +79,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Free disk space - uses: ./.github/actions/free-disk-space - - name: Get changed files id: changed-files uses: tj-actions/changed-files@v45 @@ -92,6 +92,12 @@ jobs: ansible/** docker/** + - name: Free disk space + if: ${{ steps.changed-files.outputs.any_changed == 'true' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref_type == 'tag') }} + uses: ./.github/actions/free-disk-space + - name: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' ||