Files
colanode/.github/workflows/server-docker-mark-latest.yml
2025-06-11 20:07:12 +02:00

31 lines
822 B
YAML

name: Server - Mark docker image as latest
on:
release:
types: [published]
env:
REGISTRY: ghcr.io
jobs:
tag-latest:
runs-on: ubuntu-latest
steps:
- 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: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Tag as latest the version image
run: |
docker buildx imagetools create --tag ${{ env.REGISTRY }}/${{ vars.SERVER_IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ vars.SERVER_IMAGE_NAME }}:${{ env.VERSION }}