Skip to content

Use github.ref_name #124

Use github.ref_name

Use github.ref_name #124

Workflow file for this run

name: Docker
on: [push, pull_request]
jobs:
clean-up:
name: Clean up
runs-on: ubuntu-latest
steps:
- name: Clean up
run: rm -rf *
create-image:
name: Create docker image
runs-on: ubuntu-latest
needs: clean-up
env:
IMAGE_TAG_SUFFIX: ""
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
path: carla-scenario-runner
submodules: true
- uses: docker/login-action@v3
name: Login to Docker Hub
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: robinraju/[email protected]
name: Download PythonAPI
with:
repository: carla-compose/carla-simulator
latest: true
fileName: PythonAPI.tar.gz
extract: true
out-file-path: .
- name: Remove PythonAPI.tar.gz
run: rm PythonAPI.tar.gz
- name: Set image tag
run: |
echo "IMAGE_TAG_SUFFIX=_$(echo '${{ github.ref_name }}' | tr / -)_ci" >> $GITHUB_ENV
if: github.ref_name != "tagging"

Check failure on line 50 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / Docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker.yml (Line: 50, Col: 13): Unexpected symbol: '"tagging"'. Located at position 20 within expression: github.ref_name != "tagging"
- uses: docker/build-push-action@v5
name: Build and push
with:
push: true
file: carla-scenario-runner/docker/Dockerfile
tags: rwthika/carla-scenario-runner:latest${{env.IMAGE_TAG_SUFFIX}}
no-cache: true
context: .