Skip to content

Fix latest tag

Fix latest tag #55

Workflow file for this run

name: Deploy Images to GitHub Container Registry
on: push
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@main
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY}}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
# - name: Build and push Docker image as latest
# uses: docker/build-push-action@v5
# with:
# context: .
# file: Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# tags: latest
# labels: ${{ steps.meta.outputs.labels }}