CI: fix Docker build & push 💚

This commit is contained in:
Jannis R 2023-03-26 18:33:48 +02:00
parent 1047946a23
commit ba256397d0
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -34,13 +34,11 @@ jobs:
- name: build Docker image & push to Docker Hub - name: build Docker image & push to Docker Hub
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: .
push: true push: true
tags: | tags: |
derhuerst/db-rest:6 derhuerst/db-rest:6
derhuerst/db-rest:latest derhuerst/db-rest:latest
# https://docs.docker.com/build/ci/github-actions/examples/#github-cache
cache-from: type=gha
cache-to: type=gha,mode=max,oci-mediatypes=true,compression=zstd
# this is for the public-transport/infrastructure cluster # this is for the public-transport/infrastructure cluster
- name: log in to GitHub Container Registry - name: log in to GitHub Container Registry
@ -58,8 +56,6 @@ jobs:
- name: push Docker image to GitHub Registry - name: push Docker image to GitHub Registry
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: .
push: true push: true
tags: ghcr.io/${{github.repository}}:v6_${{steps.hash.outputs.hash}}_${{steps.datetime.outputs.datetime}} tags: ghcr.io/${{github.repository}}:v6_${{steps.hash.outputs.hash}}_${{steps.datetime.outputs.datetime}}
# https://docs.docker.com/build/ci/github-actions/examples/#github-cache
cache-from: type=gha
cache-to: type=gha,mode=max,oci-mediatypes=true,compression=zstd