Skip to content

Commit 6e2267f

Browse files
committed
testing workflow
1 parent 545c3b4 commit 6e2267f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/build_and_publish_docker.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
id: vars
4444
run: |
4545
TAG_NAME=${GITHUB_REF#refs/tags/}
46+
IMAGE_NAME_LOWER=$(echo "${GITHUB_REPOSITORY}" | tr '[:upper:]' '[:lower:]')
4647
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
47-
# Check if it's a release version (not a pre-release)
48+
echo "image_name=${IMAGE_NAME_LOWER}" >> $GITHUB_OUTPUT
49+
4850
if [[ "$TAG_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
4951
echo "latest=true" >> $GITHUB_OUTPUT
5052
else
@@ -55,15 +57,13 @@ jobs:
5557
uses: docker/build-push-action@v5
5658
with:
5759
context: .
58-
file: src/docker/Dockerfile
60+
file: ./src/docker/Dockerfile
5961
push: true
60-
build-args: |
61-
IMAGE_TAG=${{ steps.vars.outputs.tag }}
6262
tags: |
63-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.tag }}
64-
${{ steps.vars.outputs.latest == 'true' && format('{0}/{1}:latest', env.REGISTRY, env.IMAGE_NAME) || '' }}
63+
ghcr.io/${{ steps.vars.outputs.image_name }}:${{ steps.vars.outputs.tag }}
64+
${{ steps.vars.outputs.latest == 'true' && format('ghcr.io/{0}:latest', steps.vars.outputs.image_name) || '' }}
6565
labels: |
66-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
66+
org.opencontainers.image.source=${{ github.repositoryUrl }}
6767
org.opencontainers.image.version=${{ steps.vars.outputs.tag }}
6868
org.opencontainers.image.created=${{ github.event.head_commit.timestamp || github.event.release.published_at || github.event.repository.updated_at }}
6969
org.opencontainers.image.revision=${{ github.sha }}

0 commit comments

Comments
 (0)