-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ci): refactor
docker-build-and-push
action (#4948)
* cache only on no-cuda Signed-off-by: Yutaka Kondo <[email protected]> * version up Signed-off-by: Yutaka Kondo <[email protected]> * version up Signed-off-by: Yutaka Kondo <[email protected]> * rename Signed-off-by: Yutaka Kondo <[email protected]> * rename Signed-off-by: Yutaka Kondo <[email protected]> * rename to health-check Signed-off-by: Yutaka Kondo <[email protected]> * refactor action Signed-off-by: Yutaka Kondo <[email protected]> * remove old comment Signed-off-by: Yutaka Kondo <[email protected]> * revert free disk Signed-off-by: Yutaka Kondo <[email protected]> --------- Signed-off-by: Yutaka Kondo <[email protected]>
- Loading branch information
Showing
3 changed files
with
32 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ name: docker-build-and-push | |
description: "" | ||
|
||
inputs: | ||
name: | ||
description: "" | ||
required: true | ||
platform: | ||
description: "" | ||
required: true | ||
bake-target: | ||
description: "" | ||
required: true | ||
|
@@ -35,6 +41,28 @@ runs: | |
vcs import src < autoware.repos | ||
shell: bash | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Restore cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
root-ccache | ||
key: cache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('autoware.repos') }} | ||
restore-keys: | | ||
cache-${{ inputs.platform }}-${{ inputs.name }}- | ||
cache-${{ inputs.platform }}- | ||
- name: Inject cache into docker | ||
uses: reproducible-containers/[email protected] | ||
with: | ||
cache-map: | | ||
{ | ||
"root-ccache": "/root/.ccache" | ||
} | ||
skip-extraction: true | ||
|
||
- name: Set Docker tags | ||
id: set-docker-tags | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
# EVENTS: push, schedule, workflow_dispatch | ||
# workflow_dispatch: Build all. No publish to registry; save as tarball. | ||
# schedule: Build only devel and prebuilt. TAGS: date, latest | ||
# push-branch: Build only devel and prebuilt. TAGS: date, latest | ||
# push-tag: Build all. TAGS: version, date, latest | ||
|
||
name: docker-build-and-push-self-hosted | ||
|
||
on: | ||
|
@@ -56,9 +50,6 @@ jobs: | |
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set git config | ||
uses: autowarefoundation/autoware-github-actions/set-git-config@v1 | ||
with: | ||
|
@@ -67,28 +58,11 @@ jobs: | |
- name: Free disk space | ||
uses: ./.github/actions/free-disk-space | ||
|
||
- name: Restore cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
root-ccache | ||
key: cache-${{ matrix.platform }}-${{ matrix.name }}-${{ hashFiles('autoware.repos') }} | ||
restore-keys: | | ||
cache-${{ matrix.platform }}-${{ matrix.name }}- | ||
cache-${{ matrix.platform }}- | ||
- name: Inject cache into docker | ||
uses: reproducible-containers/[email protected] | ||
with: | ||
cache-map: | | ||
{ | ||
"root-ccache": "/root/.ccache" | ||
} | ||
skip-extraction: true | ||
|
||
- name: Build 'Autoware' | ||
uses: ./.github/actions/docker-build-and-push | ||
with: | ||
name: ${{ matrix.name }} | ||
platform: ${{ matrix.platform }} | ||
bake-target: autoware | ||
build-args: | | ||
*.platform=linux/${{ matrix.platform }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
# EVENTS: push, schedule, workflow_dispatch | ||
# workflow_dispatch: Build all. No publish to registry; save as tarball. | ||
# schedule: Build only devel and prebuilt. TAGS: date, latest | ||
# push-branch: Build only devel and prebuilt. TAGS: date, latest | ||
# push-tag: Build all. TAGS: version, date, latest | ||
|
||
name: docker-build-and-push | ||
|
||
on: | ||
|
@@ -51,9 +45,6 @@ jobs: | |
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set git config | ||
uses: autowarefoundation/autoware-github-actions/set-git-config@v1 | ||
with: | ||
|
@@ -62,28 +53,11 @@ jobs: | |
- name: Free disk space | ||
uses: ./.github/actions/free-disk-space | ||
|
||
- name: Restore cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
root-ccache | ||
key: cache-${{ matrix.platform }}-${{ matrix.name }}-${{ hashFiles('autoware.repos') }} | ||
restore-keys: | | ||
cache-${{ matrix.platform }}-${{ matrix.name }}- | ||
cache-${{ matrix.platform }}- | ||
- name: Inject cache into docker | ||
uses: reproducible-containers/[email protected] | ||
with: | ||
cache-map: | | ||
{ | ||
"root-ccache": "/root/.ccache" | ||
} | ||
skip-extraction: true | ||
|
||
- name: Build 'Autoware' | ||
uses: ./.github/actions/docker-build-and-push | ||
with: | ||
name: ${{ matrix.name }} | ||
platform: ${{ matrix.platform }} | ||
bake-target: autoware | ||
build-args: | | ||
*.platform=linux/${{ matrix.platform }} | ||
|