Skip to content

Commit

Permalink
fix: tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
developStorm committed Jul 12, 2023
1 parent 1a8ced7 commit 374f4ee
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- gcc/*

env:
IMAGE_NAME: ${{ github.repository_owner }}/caentainer-gcc
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/caentainer-gcc

jobs:
push:
Expand All @@ -18,11 +18,25 @@ jobs:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2

- name: Generate Image Tag
id: image-tag
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[ "$VERSION" == "main" ] && VERSION=latest
echo VERSION=$VERSION
echo "::set-output name=TAG::${VERSION}"
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ steps.image-tag.outputs.TAG }}
type=ref,event=branch
type=ref,event=tag
- name: Log into GitHub Container Registry
uses: docker/login-action@v2
Expand Down

0 comments on commit 374f4ee

Please sign in to comment.