Skip to content

Add carla-server image #1

Add carla-server image

Add carla-server image #1

name: Build CarlaSim server container images
on:
workflow_dispatch:
push:
paths:
- carlasim/server/Dockerfile
- .github/workflows/carlasim-server.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:
server-container-build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Free disk space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: 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/server
target: carla-server
build-args: |
"CARLA_VERSION=${{ env.CARLA_VERSION }}"
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:server-${{ env.CARLA_VERSION }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max