github actions: build OCI images that contin both amd64 and armv7

- ref. https://docs.docker.com/engine/reference/commandline/buildx_build/#platform
- ref. https://docs.docker.com/build/ci/github-actions/multi-platform/
- replaces https://github.com/shaarli/Shaarli/pull/1496
- make docker image name configurable through CI variables for easier testing
This commit is contained in:
nodiscc 2023-03-21 16:19:24 +01:00
parent 9c9d6298bf
commit fd4379992d
No known key found for this signature in database
GPG key ID: 067FC4266A4B6909
2 changed files with 6 additions and 4 deletions

View file

@ -35,8 +35,9 @@ jobs:
with: with:
context: . context: .
push: true push: true
platforms: linux/amd64,linux/arm/v7
tags: | tags: |
shaarli/shaarli:latest ${{ secrets.DOCKER_IMAGE }}:latest
ghcr.io/shaarli/shaarli:latest ghcr.io/${{ secrets.DOCKER_IMAGE }}:latest
- name: Image digest - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}

View file

@ -35,8 +35,9 @@ jobs:
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
push: true push: true
platforms: linux/amd64,linux/arm/v7
tags: | tags: |
shaarli/shaarli:${{ env.REF }} ${{ secrets.DOCKER_IMAGE }}:${{ env.REF }}
ghcr.io/shaarli/shaarli:${{ env.REF }} ghcr.io/${{ secrets.DOCKER_IMAGE }}:${{ env.REF }}
- name: Image digest - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}