Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong docker image name #16

Merged
merged 1 commit into from
Aug 7, 2024
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
26 changes: 12 additions & 14 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,25 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Determine tags for Docker image
id: set-tags
run: |
echo "TAGS=${{ github.sha }}" >> $GITHUB_ENV
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
echo "TAGS=type=ref,event=tag" >> $GITHUB_ENV
fi

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
ghcr.io/${{ github.repository }}

- name: Build and push Docker images when push to main
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
if: github.ref == 'refs/heads/main'
with:
context: .
push: true
tags: ${{ steps.meta.outputs.images }}:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
images: ghcr.io/${{ github.repository }}
tags: ${{ env.TAGS }}

- name: Build and push Docker images when release
- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
if: startsWith(github.ref, 'refs/tags/v')
with:
context: .
push: true
tags: ${{ steps.meta.outputs.images }}:${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading