Skip to content

Commit

Permalink
Manually log in to Github Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Mar 4, 2024
1 parent 85dafeb commit 1a85aac
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ jobs:
- name: Set up Docker Build
uses: docker/setup-buildx-action@v1

- name: Build and push Docker image
uses: docker/build-push-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
context: .
file: build/prod.Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/pfadiolten-home:latest
ghcr.io/${{ github.repository_owner }}/pfadiolten-home:${{ github.sha }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/pfadiolten-home:latest .
docker push ghcr.io/${{ github.repository_owner }}/pfadiolten-home:latest
env:
DOCKER_USERNAME: ${{ secrets.GITHUB_ACTOR }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_BUILDKIT: 1

0 comments on commit 1a85aac

Please sign in to comment.