Skip to content

Commit

Permalink
ci: push image to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
ngc7331 committed Jun 27, 2024
1 parent 7e334cd commit a44c0e2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
- dockerfile-suffix: ".unsafe"
tag-suffix: "-unsafe"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -33,11 +36,22 @@ jobs:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile${{ matrix.dockerfile-suffix }}
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ngc7331/derper:latest${{ matrix.tag-suffix }}, ngc7331/derper:${{ env.VERSION }}${{ matrix.tag-suffix }}
tags: |
ngc7331/derper:latest${{ matrix.tag-suffix }}
ngc7331/derper:${{ env.VERSION }}${{ matrix.tag-suffix }}
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest${{ matrix.tag-suffix }}
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ env.VERSION }}${{ matrix.tag-suffix }}

0 comments on commit a44c0e2

Please sign in to comment.