Skip to content

fix (ci): remove 'v' from docker image tags #14

fix (ci): remove 'v' from docker image tags

fix (ci): remove 'v' from docker image tags #14

Workflow file for this run

name: Release
on:
push:
branches: ["main"]
tags: ["v*"]
jobs:
lint:
uses: "./.github/workflows/_lint.yml"
build:
uses: "./.github/workflows/_build.yml"
publish-image:
name: Publish Docker Image
needs: ["lint", "build"]
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Calculate Image Tag
run: |
export CALCULATED_TAG=$(echo ${{ github.ref_name }} | sed 's/^v//g')
echo "Calculated image tag is $CALCULATED_TAG"
echo "CALCULATED_IMAGE_TAG=$CALCULATED_TAG" >> "$GITHUB_ENV"
- name: Push Docker Image
uses: docker/build-push-action@v5
with:
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.CALCULATED_IMAGE_TAG }}