Skip to content

Remove old carla images #3

Remove old carla images

Remove old carla images #3

name: Build CarlaSim release container images
on:
workflow_dispatch:
push:
paths:
- carlasim/release/Dockerfile
- .github/workflows/carlasim-release.yml # Self-trigger
env:
REGISTRY: ghcr.io
IMAGE_NAME: bounverif/carla
CARLA_VERSION: 0.9.15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-container-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Free disk space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push container image
uses: docker/build-push-action@v5
with:
context: carlasim/release
target: carla-release
build-args: |
"CARLA_VERSION=${{ env.CARLA_VERSION }}"
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:release-${{ env.CARLA_VERSION }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push extended image
uses: docker/build-push-action@v5
with:
context: carlasim/release
target: carla-release-extra
build-args: |
"CARLA_VERSION=${{ env.CARLA_VERSION }}"
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:release-extra-${{ env.CARLA_VERSION }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max