Merge pull request #1949 from hydrargyrum/master

ci: push container images to github registry in addition to dockerhub
This commit is contained in:
nodiscc 2023-03-17 01:15:26 +00:00 committed by GitHub
commit 99485504d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 2 deletions

View file

@ -10,16 +10,27 @@ jobs:
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: shaarli/shaarli:latest
tags: |
shaarli/shaarli:latest
ghcr.io/shaarli/shaarli:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View file

@ -16,16 +16,27 @@ jobs:
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: shaarli/shaarli:${{ env.REF }}
tags: |
shaarli/shaarli:${{ env.REF }}
ghcr.io/shaarli/shaarli:${{ env.REF }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}