Skip to content

Commit

Permalink
fix: login to registry before pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
theredrad committed Sep 30, 2021
1 parent d564a24 commit 28866f5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/docker-image-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Docker image
on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
Expand All @@ -18,12 +18,14 @@ jobs:
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.API_TOKEN_GITHUB }}
registry: docker.pkg.github.com
repository: manasky/lorem-server/lorem-server-image
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
with:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 28866f5

Please sign in to comment.