Skip to content

Commit

Permalink
Update docker push actions and use runner's credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel committed Feb 2, 2024
1 parent 9691cb5 commit 0f7b3d9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: |
Expand All @@ -24,12 +27,12 @@ jobs:
type=ref,event=branch
type=sha,prefix={{date 'YYYYMMDDHHmmss'}}
type=raw,value=latest,enable={{is_default_branch}}
- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.SBIHEL_GH_PACKAGE_PUSH_TOKEN }}
- uses: docker/build-push-action@v4
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit 0f7b3d9

Please sign in to comment.