Skip to content

Commit

Permalink
refactor(ci): install vcstool and run vcs import on `docker-build…
Browse files Browse the repository at this point in the history
…-and-push.yaml` (autowarefoundation#4845)

* refactor docker-build-and-push

Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>

* fix shell

Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>

---------

Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Co-authored-by: oguzkaganozt <oguzkaganozt@gmail.com>
  • Loading branch information
2 people authored and pravinkmr26 committed Jul 15, 2024
1 parent d3a7b69 commit ddcdb94
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 48 deletions.
11 changes: 9 additions & 2 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ runs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Install jq
- name: Install jq and vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install jq
sudo apt-get -y install jq python3-pip
pip install --no-cache-dir vcstool
shell: bash

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos
shell: bash

- name: Set Docker tags
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/build-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Install vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pip install --no-cache-dir vcstool
- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
Expand All @@ -60,12 +54,7 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos
- name: Build 'autoware-universe'
- name: Build 'Autoware'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Install vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pip install --no-cache-dir vcstool
- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
Expand All @@ -55,12 +49,7 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos
- name: Build 'autoware-universe'
- name: Build 'Autoware'
uses: ./.github/actions/docker-build-and-push
with:
bake-target: autoware
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Install vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pip install --no-cache-dir vcstool
- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
Expand All @@ -72,11 +66,6 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos
- name: Build 'Autoware'
uses: ./.github/actions/docker-build-and-push
with:
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Install vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pip install --no-cache-dir vcstool
- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
Expand All @@ -67,11 +61,6 @@ jobs:
- name: Free disk space
uses: ./.github/actions/free-disk-space

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos
- name: Build 'Autoware'
uses: ./.github/actions/docker-build-and-push
with:
Expand Down

0 comments on commit ddcdb94

Please sign in to comment.