0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-20 22:14:44 +01:00

drop remote cache fully

This commit is contained in:
TheFox0x7 2025-10-18 16:34:54 +02:00
parent 2f9e04745d
commit db78470cae
No known key found for this signature in database
GPG Key ID: 6CA33903484AF7C2
4 changed files with 6 additions and 41 deletions

View File

@ -11,48 +11,21 @@ jobs:
files-changed:
uses: ./.github/workflows/files-changed.yml
regular:
contianer:
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Get cleaned branch name
id: clean_name
run: |
# if main then say nightly otherwise cleanup name
if [ "${{ github.base_ref }}" = "refs/heads/main" ]; then
echo "branch=nightly" >> "$GITHUB_OUTPUT"
exit 0
fi
REF_NAME=$(echo "${{ github.base_ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
- name: Build regular variant
uses: docker/build-push-action@v5
with:
push: false
tags: gitea/gitea:linux-amd64
platforms: linux/amd64,linux/arm64,linux/riscv64
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}
rootless:
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- name: Get cleaned branch name
id: clean_name
run: |
# if main then say nightly otherwise cleanup name
if [ "${{ github.base_ref }}" = "refs/heads/main" ]; then
echo "branch=nightly" >> "$GITHUB_OUTPUT"
exit 0
fi
REF_NAME=$(echo "${{ github.base_ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
- name: Build rootless variant
uses: docker/build-push-action@v5
with:
push: false
file: Dockerfile.rootless
tags: gitea/gitea:linux-amd64
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}-rootless
tags: gitea/gitea:linux-amd64,linux/arm64,linux/riscv64

View File

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

View File

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