Merge pull request #1949 from hydrargyrum/master
ci: push container images to github registry in addition to dockerhub
This commit is contained in:
commit
99485504d0
2 changed files with 24 additions and 2 deletions
13
.github/workflows/docker-latest.yml
vendored
13
.github/workflows/docker-latest.yml
vendored
|
@ -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 }}
|
||||
|
|
13
.github/workflows/docker-tags.yml
vendored
13
.github/workflows/docker-tags.yml
vendored
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue