Skip to content

Build Autoware prebuilt image #294

Build Autoware prebuilt image

Build Autoware prebuilt image #294

name: Build Autoware prebuilt image
on:
workflow_dispatch:
schedule:
- cron: '41 20 * * *' # Every day at 20:41 UTC
push:
paths:
- containers/autoware-prebuilt/Dockerfile
- .github/workflows/autoware_prebuilt.yml # Self-trigger
env:
REGISTRY: ghcr.io
IMAGE_NAME: bounverif/autoware-prebuilt
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Set release version
run: |
echo "AUTOWARE_VERSION=$(date +%+4Y%m%d)" >> ${GITHUB_ENV}
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: containers/autoware-prebuilt
build-args: |
AUTOWARE_VERSION=${{ env.AUTOWARE_VERSION }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
push: true