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

fix(docker): remove build main action #4747

Closed
wants to merge 11 commits into from
Closed
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
5 changes: 2 additions & 3 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
required: false
allow-push:
description: ""
default: "true"
default: "false"
required: false

runs:
Expand Down Expand Up @@ -108,8 +108,7 @@ runs:
password: ${{ github.token }}

- name: Build and Push to GitHub Container Registry
if: ${{ github.event_name == 'push' ||
github.event_name == 'schedule' ||
if: ${{ github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v5
with:
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/build-main-self-hosted.yaml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/build-main.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# push-branch: Build only devel and prebuilt. TAGS: date, latest
# push-tag: Build all. TAGS: version, date, latest

name: docker-build-and-push-main-self-hosted
name: docker-build-self-hosted

on:
push:
tags:
- openadkit-v*.*.*
schedule:
- cron: 0 0 1,15 * *
- cron: 0 12 * * *
workflow_dispatch:
inputs:
artifacts-destination:
Expand All @@ -26,7 +26,7 @@ jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

docker-build-and-push-main-self-hosted:
docker-build-self-hosted:
needs: load-env
runs-on: [self-hosted, linux, ARM64]
strategy:
Expand All @@ -48,6 +48,12 @@ jobs:
lib_dir: aarch64
additional-tag-suffix: -cuda
steps:
- name: Check if push day
if: ${{ github.event_name == 'schedule' }}
run: |
if [ $(date +'%d') -eq 01 ] || [ $(date +'%d') -eq 15 ]; then echo "IS_PUSH_DAY=true" >> $GITHUB_ENV; else echo "IS_PUSH_DAY=false" >> $GITHUB_ENV; fi
echo "Day of the month: $(date +'%d')"

# https://github.com/actions/checkout/issues/211
- name: Change permission of workspace
run: |
Expand Down Expand Up @@ -101,7 +107,7 @@ jobs:
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
allow-push: ${{ env.IS_PUSH_DAY == 'true' }}

- name: Show disk space
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# push-branch: Build only devel and prebuilt. TAGS: date, latest
# push-tag: Build all. TAGS: version, date, latest

name: docker-build-and-push-main
name: docker-build

on:
push:
tags:
- openadkit-v*.*.*
schedule:
- cron: 0 0 1,15 * *
- cron: 0 12 * * *
workflow_dispatch:
inputs:
artifacts-destination:
Expand All @@ -26,7 +26,7 @@ jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

docker-build-and-push-main:
docker-build:
needs: load-env
runs-on: ubuntu-latest
strategy:
Expand All @@ -48,6 +48,12 @@ jobs:
lib_dir: x86_64
additional-tag-suffix: -cuda
steps:
- name: Check if push day
if: ${{ github.event_name == 'schedule' }}
run: |
if [ $(date +'%d') -eq 01 ] || [ $(date +'%d') -eq 15 ]; then echo "IS_PUSH_DAY=true" >> $GITHUB_ENV; else echo "IS_PUSH_DAY=false" >> $GITHUB_ENV; fi
echo "Day of the month: $(date +'%d')"

- name: Check out repository
uses: actions/checkout@v4

Expand Down Expand Up @@ -96,7 +102,7 @@ jobs:
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
allow-push: ${{ env.IS_PUSH_DAY == 'true' }}

- name: Show disk space
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

<!--- 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"
<a href="https://github.com/autowarefoundation/autoware/actions/workflows/docker-build.yaml">
<img src="https://github.com/autowarefoundation/autoware/actions/workflows/docker-build.yaml/badge.svg?branch=main"
alt="Build Main 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"
Expand Down
Loading