Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: zenfulcode/commercifygo
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
Expand All @@ -28,22 +26,18 @@ jobs:
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN || secrets.GITHUB_TOKEN }}

- name: Debug repository info
- name: Convert repository name to lowercase
run: |
echo "Repository: ${{ github.repository }}"
echo "Repository owner: ${{ github.repository_owner }}"
echo "Image name: ${{ env.IMAGE_NAME }}"
echo "Registry: ${{ env.REGISTRY }}"
echo "Full image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
echo "IMAGE_NAME_LOWER=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
Expand Down