Skip to content

Make sure we lowercase the repository name! #79

Make sure we lowercase the repository name!

Make sure we lowercase the repository name! #79

Workflow file for this run

name: Docker Image
concurrency: ${{ github.workflow }}-${{ github.ref }}
on:
push:
branches:
- "**"
tags:
- "*"
pull_request:
branches:
- master
jobs:
build-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')
- name: Build and also push Dockerimage
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: |

Check failure on line 57 in .github/workflows/build-docker.yml

View workflow run for this annotation

GitHub Actions / Docker Image

Invalid workflow file

The workflow is not valid. .github/workflows/build-docker.yml (Line: 57, Col: 17): Unexpected symbol: '|'. Located at position 107 within expression: github.event_name == 'push' && github.ref_type == 'tag' && format('{0}/{1}', env.REGISTRY, env.IMAGE_NAME | toLowerCase)
${{ env.REGISTRY }}/$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'):${{ github.sha }}
${{ env.REGISTRY }}/$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]'):latest
${{ github.event_name == 'push' && github.ref_type == 'tag' && format('{0}/{1}', env.REGISTRY, env.IMAGE_NAME | toLowerCase) }}:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}