CI: minor tweaks 💚

This commit is contained in:
Jannis R 2023-03-25 16:58:54 +01:00
parent 5658c84c54
commit 1047946a23
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -32,12 +32,15 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: build Docker image & push to Docker Hub - name: build Docker image & push to Docker Hub
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
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
@ -53,7 +56,10 @@ jobs:
id: datetime id: datetime
run: echo "::set-output name=datetime::$(date -u +'%Y-%m-%dT%H.%M.%SZ')" run: echo "::set-output name=datetime::$(date -u +'%Y-%m-%dT%H.%M.%SZ')"
- name: push Docker image to GitHub Registry - name: push Docker image to GitHub Registry
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
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