add inline cache
Rust / test (push) Successful in 1m39s Details
Docker / build-push (push) Successful in 15m44s Details

This commit is contained in:
DataHearth 2023-06-26 17:52:14 +02:00
parent afc94a18ff
commit 5254679290
No known key found for this signature in database
GPG Key ID: E88FD356ACC5F3C4
2 changed files with 12 additions and 4 deletions

View File

@ -35,8 +35,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
${{ github.repository }}
${{ env.REGISTRY }}/${{ github.repository }}
${{ gitea.repository }}
${{ env.REGISTRY }}/${{ gitea.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
@ -47,5 +47,7 @@ jobs:
with:
context: .
push: true
cache-to: type=inline
cache-from: type=registry,ref=datahearth/tech-bot:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -4,6 +4,9 @@ on:
push:
tags: ["v*.*.*"]
env:
REGISTRY: ghcr.io
jobs:
build-push:
runs-on: ubuntu-latest
@ -17,7 +20,7 @@ jobs:
- name: Log into registry GitHub
uses: docker/login-action@v2
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: DataHearth
password: ${{ secrets.REGISTRY_TOKEN }}
@ -25,7 +28,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
@ -34,6 +37,9 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: true
cache-to: type=inline
cache-from: type=registry,ref=datahearth/tech-bot:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}