Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Autoware builder container images using Buildah | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '34 15 * * 0' # 15:34 UTC every Sunday | |
push: | |
paths: | |
- Dockerfile | |
- autoware.repos.yml | |
- .github/workflows/builder-buildah-build.yml # Self-trigger | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: bounverif/autoware | |
AUTOWARE_VERSION: latest | |
TMPDIR: /var/lib/containers/tmp | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
autoware-builder-build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@v10 | |
with: | |
root-reserve-mb: 2048 # Reserve disk space for repository | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
remove-codeql: 'true' | |
remove-docker-images: 'true' | |
build-mount-path: '/var/lib/containers' # The remaining space only for container build | |
- run: mkdir -p $TMPDIR | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set current date as the version | |
run: echo "AUTOWARE_VERSION=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- name: Build builder image | |
run: | | |
TMPDIR=${{env.TMPDIR}} /usr/bin/buildah bud . | |
--platform linux/amd64 | |
-f ./Dockerfile | |
--build-arg AUTOWARE_VERSION=20240722 | |
--format oci | |
--tls-verify=true | |
--layers=true | |
--target autoware-builder | |
-t bounverif/autoware:${{ env.AUTOWARE_VERSION }}-builder | |
- name: Buildah Action | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
platform: linux/amd64 | |
image: ${{ env.IMAGE_NAME }} | |
tags: ${{ env.AUTOWARE_VERSION }}-builder latest | |
layers: true | |
oci: true | |
build-args: | | |
AUTOWARE_VERSION=${{ env.AUTOWARE_VERSION }} | |
extra-args: | |
--target autoware-builder | |
containerfiles: | | |
./Dockerfile | |
- name: Log in to the GitHub Container registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Push to GitHub Container Repository | |
# id: push-to-ghcr | |
# uses: redhat-actions/push-to-registry@v2 | |
# with: | |
# image: ${{ steps.build-image.outputs.image }} | |
# tags: ${{ steps.build-image.outputs.tags }} | |
# registry: ${{ env.REGISTRY }} |