Skip to content

dont listen to /docs #7

dont listen to /docs

dont listen to /docs #7

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- 'v*.*.*'
permissions:
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract tag name
id: tag_name
env:
FULL_TAG: ${{ github.ref_name }}
run:
TAG=${FULL_TAG#v}
echo "tag=${TAG}" >> $GITHUB_OUTPUT
EXTENSION="${TAG#*-}"
if [[ "$EXTENSION" != "$TAG" ]]; then
echo "extension=true" >> $GITHUB_OUTPUT
else
echo "extension=false" >> $GITHUB_OUTPUT
fi
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |

Check failure on line 51 in .github/workflows/push_docker.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/push_docker.yml (Line: 51, Col: 15): Unrecognized named-value: 'if'. Located at position 1 within expression: if steps.tag_name.outputs.extension == 'false'
ghcr.io/${{ github.repository }}:${{ steps.tag_name.outputs.tag }}
${{ if steps.tag_name.outputs.extension == 'false' }}ghcr.io/${{ github.repository }}:latest${{ end if }}
- name: Docker Image Digest
run: echo "The Docker image digest is ${{ steps.build-and-push.outputs.digest }}"