Skip to content

Try restarting docker service #3

Try restarting docker service

Try restarting docker service #3

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: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Restart docker
run: sudo service docker restart
- 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