Skip to content

Fix Docker image tag to use lowercase repository name #4

Fix Docker image tag to use lowercase repository name

Fix Docker image tag to use lowercase repository name #4

name: Docker Publish
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository | lowercase }}

Check failure on line 11 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / Docker Publish

Invalid workflow file

The workflow is not valid. .github/workflows/docker-publish.yml (Line: 11, Col: 15): Unexpected symbol: '|'. Located at position 19 within expression: github.repository | lowercase
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest