Skip to content

Commit ceccfb3

Browse files
authored
Merge branch 'main' into upstream-update-dockerignore
2 parents a4bca27 + ed46a7a commit ceccfb3

File tree

4 files changed

+41
-54
lines changed

4 files changed

+41
-54
lines changed

.github/actions/docker-build-and-push/action.yaml

+2-27
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ inputs:
2020
tag-suffix:
2121
description: ""
2222
required: false
23-
allow-push:
24-
description: ""
25-
default: "true"
26-
required: false
2723

2824
runs:
2925
using: composite
@@ -138,48 +134,27 @@ runs:
138134
suffix=-devel${{ inputs.tag-suffix }}
139135
140136
- name: Docker meta for runtime
141-
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_type == 'tag') }}
142137
id: meta-runtime
143138
uses: docker/metadata-action@v5
144139
with:
145140
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
146141
tags: ${{ steps.set-docker-tags.outputs.tags }}
147142
bake-target: docker-metadata-action-runtime
148143
flavor: |
149-
latest=${{ github.event_name == 'push' && github.ref_type == 'tag' }}
144+
latest=auto
150145
suffix=-runtime${{ inputs.tag-suffix }}
151146
152147
- name: Login to GitHub Container Registry
153-
if: ${{ github.event_name != 'pull_request' }}
154148
uses: docker/login-action@v3
155149
with:
156150
registry: ghcr.io
157151
username: ${{ github.repository_owner }}
158152
password: ${{ github.token }}
159153

160154
- name: Build and Push to GitHub Container Registry
161-
if: ${{ github.event_name == 'push' ||
162-
github.event_name == 'schedule' ||
163-
(github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
164-
uses: docker/bake-action@v5
165-
with:
166-
push: ${{ inputs.allow-push == 'true' }}
167-
files: |
168-
docker/docker-bake.hcl
169-
${{ steps.meta-base.outputs.bake-file }}
170-
${{ steps.meta-autoware-core.outputs.bake-file }}
171-
${{ steps.meta-autoware-universe.outputs.bake-file }}
172-
${{ steps.meta-devel.outputs.bake-file }}
173-
${{ steps.meta-runtime.outputs.bake-file }}
174-
provenance: false
175-
set: |
176-
${{ inputs.build-args }}
177-
178-
- name: Build only
179-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
180155
uses: docker/bake-action@v5
181156
with:
182-
push: false
157+
push: true
183158
files: |
184159
docker/docker-bake.hcl
185160
${{ steps.meta-base.outputs.bake-file }}

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

+18-12
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,10 @@ name: docker-build-and-push-self-hosted
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
6-
- openadkit-v*.*.*
7-
schedule:
8-
- cron: 0 0 1,15 * *
98
workflow_dispatch:
10-
inputs:
11-
artifacts-destination:
12-
type: choice
13-
description: Destination for the artifacts
14-
options:
15-
- registry
16-
- tarball
17-
default: tarball
189

1910
jobs:
2011
load-env:
@@ -58,7 +49,23 @@ jobs:
5849
- name: Free disk space
5950
uses: ./.github/actions/free-disk-space
6051

52+
- name: Get changed files
53+
id: changed-files
54+
uses: tj-actions/changed-files@v44
55+
with:
56+
files: |
57+
*.env
58+
*.repos
59+
.github/actions/docker-build-and-push/action.yaml
60+
.github/workflows/docker-build-and-push*.yaml
61+
ansible-galaxy-requirements.yaml
62+
ansible/**
63+
docker/**
64+
6165
- name: Build 'Autoware'
66+
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
67+
github.event_name == 'workflow_dispatch' ||
68+
(github.event_name == 'push' && github.ref_type == 'tag') }}
6269
uses: ./.github/actions/docker-build-and-push
6370
with:
6471
name: ${{ matrix.name }}
@@ -75,7 +82,6 @@ jobs:
7582
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max
7683
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
7784
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
78-
allow-push: true
7985

8086
- name: Show disk space
8187
run: |

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

+18-12
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,10 @@ name: docker-build-and-push
22

33
on:
44
push:
5+
branches:
6+
- main
57
tags:
6-
- openadkit-v*.*.*
7-
schedule:
8-
- cron: 0 0 1,15 * *
98
workflow_dispatch:
10-
inputs:
11-
artifacts-destination:
12-
type: choice
13-
description: Destination for the artifacts
14-
options:
15-
- registry
16-
- tarball
17-
default: tarball
189

1910
jobs:
2011
load-env:
@@ -53,7 +44,23 @@ jobs:
5344
- name: Free disk space
5445
uses: ./.github/actions/free-disk-space
5546

47+
- name: Get changed files
48+
id: changed-files
49+
uses: tj-actions/changed-files@v44
50+
with:
51+
files: |
52+
*.env
53+
*.repos
54+
.github/actions/docker-build-and-push/action.yaml
55+
.github/workflows/docker-build-and-push*.yaml
56+
ansible-galaxy-requirements.yaml
57+
ansible/**
58+
docker/**
59+
5660
- name: Build 'Autoware'
61+
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
62+
github.event_name == 'workflow_dispatch' ||
63+
(github.event_name == 'push' && github.ref_type == 'tag') }}
5764
uses: ./.github/actions/docker-build-and-push
5865
with:
5966
name: ${{ matrix.name }}
@@ -70,7 +77,6 @@ jobs:
7077
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max
7178
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
7279
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
73-
allow-push: true
7480

7581
- name: Show disk space
7682
run: |

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131

3232
<!--- CI Reports -->
3333
<p align="center">
34-
<a href="https://github.com/autowarefoundation/autoware/actions/workflows/build-main.yaml?query=branch%3Amain">
35-
<img src="https://img.shields.io/github/actions/workflow/status/autowarefoundation/autoware/build-main.yaml?style=flat&label=build-main"
36-
alt="Build Main CI" /></a>
34+
<a href="https://github.com/autowarefoundation/autoware/actions/workflows/health-check.yaml?query=branch%3Amain">
35+
<img src="https://img.shields.io/github/actions/workflow/status/autowarefoundation/autoware/health-check.yaml?style=flat&label=health-check"
36+
alt="health-check CI" /></a>
3737
<a href="https://app.codecov.io/gh/autowarefoundation/autoware.universe">
3838
<img src="https://img.shields.io/codecov/c/gh/autowarefoundation/autoware.universe?style=flat&label=Coverage&logo=codecov&logoColor=white"
3939
alt="Code Coverage" /></a>

0 commit comments

Comments
 (0)