Skip to content

Commit

Permalink
Fixed auth warning and registry push param
Browse files Browse the repository at this point in the history
  • Loading branch information
jordybronowicki37 authored Sep 9, 2024
1 parent 05ae6e3 commit 17d6f70
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ env:

jobs:
build-and-publish:
runs-on: ubuntu-latest

permissions:
packages: write
runs-on: ubuntu-latest
contents: read

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $IMAGE_NAME:${{ inputs.version }}
working-directory: backend
- name: Login to Container registry
run: docker login ghcr.io -u ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Publish the Docker image
run: docker push $IMAGE_NAME:${{ inputs.version }}
run: docker push ghcr.io/${{ github.actor }}/$IMAGE_NAME:${{ inputs.version }}

0 comments on commit 17d6f70

Please sign in to comment.