Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upstream to main #81

Merged
merged 6 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@
*.md

# Ignore Docker files
docker-bake.hcl
docker
!docker/etc

# Etc
*.ignore
*.lint
*.lock
*.log
*.out
# Ignore a part of files under src
src/**/.*
src/**/*.asc
src/**/*.csv
src/**/*.gif
src/**/*.md
src/**/*.pcd
src/**/*.png
src/**/*.svg

# Ignore generated files by colcon
build
install
log
27 changes: 2 additions & 25 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ inputs:
tag-suffix:
description: ""
required: false
allow-push:
description: ""
default: "true"
required: false
dockerhub-token:
description: ""
required: true
Expand Down Expand Up @@ -141,15 +137,14 @@ runs:
suffix=-devel${{ inputs.tag-suffix }}

- name: Docker meta for runtime
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_type == 'tag') }}
id: meta-runtime
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-runtime
flavor: |
latest=${{ github.event_name == 'push' && github.ref_type == 'tag' }}
latest=auto
suffix=-runtime${{ inputs.tag-suffix }}

- name: Login to Docker Hub
Expand All @@ -159,27 +154,9 @@ runs:
password: ${{ inputs.dockerhub-token }}

- name: Build and Push to GitHub Container Registry
if: ${{ github.event_name == 'push' ||
github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v5
with:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-autoware-core.outputs.bake-file }}
${{ steps.meta-autoware-universe.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
provenance: false
set: |
${{ inputs.build-args }}

- name: Build only
uses: docker/bake-action@v5
with:
push: false
push: true
files: |
docker/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/docker-build-and-push-self-hosted.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: docker-build-and-push-self-hosted

on:
push:
branches:
- main
tags:
workflow_dispatch:
inputs:
artifacts-destination:
type: choice
description: Destination for the artifacts
options:
- registry
- tarball
default: tarball

jobs:
load-env:
Expand All @@ -17,7 +13,7 @@

docker-build-and-push:
needs: load-env
runs-on: buildjet-16vcpu-ubuntu-2204-arm

Check warning on line 16 in .github/workflows/docker-build-and-push-self-hosted.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (buildjet)

Check warning on line 16 in .github/workflows/docker-build-and-push-self-hosted.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (vcpu)
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -58,8 +54,24 @@
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
*.env
*.repos
.github/actions/docker-build-and-push/action.yaml
.github/workflows/docker-build-and-push*.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**

- name: Build 'Autoware'
if: steps.author-check.outputs.author-found == 'true' || ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ steps.author-check.outputs.author-found == 'true' ||
steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/docker-build-and-push
with:
name: ${{ matrix.name }}
Expand All @@ -76,7 +88,6 @@
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Show disk space
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: docker-build-and-push

on:
push:
branches:
- main
tags:
workflow_dispatch:
inputs:
artifacts-destination:
type: choice
description: Destination for the artifacts
options:
- registry
- tarball
default: tarball

jobs:
load-env:
Expand All @@ -17,7 +13,7 @@

docker-build-and-push:
needs: load-env
runs-on: buildjet-16vcpu-ubuntu-2204

Check warning on line 16 in .github/workflows/docker-build-and-push.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (buildjet)

Check warning on line 16 in .github/workflows/docker-build-and-push.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (vcpu)
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -58,8 +54,24 @@
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
*.env
*.repos
.github/actions/docker-build-and-push/action.yaml
.github/workflows/docker-build-and-push*.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**

- name: Build 'Autoware'
if: steps.author-check.outputs.author-found == 'true' || ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ steps.author-check.outputs.author-found == 'true' ||
steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/docker-build-and-push
with:
name: ${{ matrix.name }}
Expand All @@ -76,7 +88,6 @@
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Show disk space
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

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