add inline cache
This commit is contained in:
parent
afc94a18ff
commit
5254679290
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue