Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
Signed-off-by: Yutaka Kondo <[email protected]>
  • Loading branch information
youtalk committed Nov 19, 2024
1 parent 4d954d3 commit 0679d24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .github/actions/docker-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ inputs:
cache-tag-suffix:
description: Suffix of the target cache tag.
required: true
repos:
description: Target .repos file.
default: [autoware.repos]
required: true
additional-repos:
description: Additional target .repos file.
default: ''
required: false
build-args:
description: Additional build args.
required: false
Expand All @@ -32,14 +32,15 @@ runs:
- name: Run vcs import
run: |
mkdir src
for repos_file in ${{ inputs.repos }}; do
vcs import src < $repos_file
done
vcs import src < autoware.repos
if [ -n "${{ inputs.additional-repos }}" ]; then
vcs import src < ${{ inputs.additional-repos }}
fi
shell: bash

- name: Cache ccache
uses: actions/cache@v4
if: ${{ github.ref == 'refs/heads/main' && inputs.repos == ['autoware.repos'] }}
if: ${{ github.ref == 'refs/heads/main' && inputs.additional-repos == '' }}
id: cache-ccache
with:
path: |
Expand All @@ -50,7 +51,7 @@ runs:
- name: Cache apt-get
uses: actions/cache@v4
if: ${{ github.ref == 'refs/heads/main' && inputs.repos == ['autoware.repos'] }}
if: ${{ github.ref == 'refs/heads/main' && inputs.additional-repos == '' }}
id: cache-apt-get
with:
path: |
Expand All @@ -61,7 +62,7 @@ runs:
- name: Restore ccache
uses: actions/cache/restore@v4
if: ${{ github.ref != 'refs/heads/main' || inputs.repos != ['autoware.repos'] }}
if: ${{ github.ref != 'refs/heads/main' || inputs.additional-repos != '' }}
with:
path: |
root-ccache
Expand All @@ -71,7 +72,7 @@ runs:
- name: Restore apt-get
uses: actions/cache/restore@v4
if: ${{ github.ref != 'refs/heads/main' || inputs.repos != ['autoware.repos'] }}
if: ${{ github.ref != 'refs/heads/main' || inputs.additional-repos != '' }}
with:
path: |
var-cache-apt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/health-check-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
platform: amd64
cache-tag-suffix: nightly
repos: [autoware.repos, autoware-nightly.repos]
additional-repos: autoware-nightly.repos
build-args: |
ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
Expand Down

0 comments on commit 0679d24

Please sign in to comment.