0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-20 13:29:56 +01:00

add cache-to and from directives

This commit is contained in:
TheFox0x7 2025-10-11 13:51:10 +02:00
parent da539d8f72
commit 2421538677
No known key found for this signature in database
GPG Key ID: 6CA33903484AF7C2
3 changed files with 8 additions and 4 deletions

View File

@ -65,10 +65,6 @@ jobs:
# fetch all commits instead of only the last as some branches are long lived and could have many between versions # fetch all commits instead of only the last as some branches are long lived and could have many between versions
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567 # fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
- run: git fetch --unshallow --quiet --tags --force - run: git fetch --unshallow --quiet --tags --force
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- uses: docker/setup-qemu-action@v3 - uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v3
- name: Get cleaned branch name - name: Get cleaned branch name
@ -118,6 +114,8 @@ jobs:
push: true push: true
tags: ${{ steps.meta_rootless.outputs.tags }} tags: ${{ steps.meta_rootless.outputs.tags }}
annotations: ${{ steps.meta_rootless.outputs.annotations }} annotations: ${{ steps.meta_rootless.outputs.annotations }}
cache-to: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache,mode=max
cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache
- name: build rootless docker image - name: build rootless docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
@ -127,3 +125,5 @@ jobs:
file: Dockerfile.rootless file: Dockerfile.rootless
tags: ${{ steps.meta_rootless.outputs.tags }} tags: ${{ steps.meta_rootless.outputs.tags }}
annotations: ${{ steps.meta_rootless.outputs.annotations }} annotations: ${{ steps.meta_rootless.outputs.annotations }}
cache-to: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache,mode=max
cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache

View File

@ -124,6 +124,7 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }} annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache
- name: build rootless container image - name: build rootless container image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
@ -133,3 +134,4 @@ jobs:
file: Dockerfile.rootless file: Dockerfile.rootless
tags: ${{ steps.meta_rootless.outputs.tags }} tags: ${{ steps.meta_rootless.outputs.tags }}
annotations: ${{ steps.meta_rootless.outputs.annotations }} annotations: ${{ steps.meta_rootless.outputs.annotations }}
cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache

View File

@ -137,6 +137,7 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }} annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache
- name: build rootless container image - name: build rootless container image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
@ -146,3 +147,4 @@ jobs:
file: Dockerfile.rootless file: Dockerfile.rootless
tags: ${{ steps.meta_rootless.outputs.tags }} tags: ${{ steps.meta_rootless.outputs.tags }}
annotations: ${{ steps.meta_rootless.outputs.annotations }} annotations: ${{ steps.meta_rootless.outputs.annotations }}
cache-from: type=registry,ref=ghcr.io/thefox0x7/gitea-buildcache