Skip to content

Commit a4339de

Browse files
committed
update all cache
1 parent 986d07d commit a4339de

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

.github/workflows/pull-docker-dryrun.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,43 @@ jobs:
1616
needs: files-changed
1717
runs-on: ubuntu-latest
1818
steps:
19+
- name: Get cleaned branch name
20+
id: clean_name
21+
run: |
22+
# if main then say nightly otherwise cleanup name
23+
if [ "${{ github.base_ref }}" = "refs/heads/main" ]; then
24+
echo "branch=nightly" >> "$GITHUB_OUTPUT"
25+
exit 0
26+
fi
27+
REF_NAME=$(echo "${{ github.base_ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
28+
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
1929
- uses: docker/setup-buildx-action@v3
2030
- uses: docker/build-push-action@v5
2131
with:
2232
push: false
2333
tags: gitea/gitea:linux-amd64
24-
cache-from: type=registry,ref=gitea/gitea:buildcache-pr-amd64
25-
cache-to: type=registry,ref=gitea/gitea:buildcache-pr-amd64,mode=max
34+
platforms: linux/amd64,linux/arm64,linux/riscv64
35+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}
2636

2737
rootless:
2838
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
2939
needs: files-changed
3040
runs-on: ubuntu-latest
3141
steps:
42+
- name: Get cleaned branch name
43+
id: clean_name
44+
run: |
45+
# if main then say nightly otherwise cleanup name
46+
if [ "${{ github.base_ref }}" = "refs/heads/main" ]; then
47+
echo "branch=nightly" >> "$GITHUB_OUTPUT"
48+
exit 0
49+
fi
50+
REF_NAME=$(echo "${{ github.base_ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
51+
echo "branch=${REF_NAME}-nightly" >> "$GITHUB_OUTPUT"
3252
- uses: docker/setup-buildx-action@v3
3353
- uses: docker/build-push-action@v5
3454
with:
3555
push: false
3656
file: Dockerfile.rootless
3757
tags: gitea/gitea:linux-amd64
38-
cache-from: type=registry,ref=gitea/gitea:buildcache-pr-amd64-rootless
39-
cache-to: type=registry,ref=gitea/gitea:buildcache-pr-amd64-rootless,mode=max
58+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}-rootless

.github/workflows/release-nightly.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ jobs:
104104
tags: |-
105105
gitea/gitea:${{ steps.clean_name.outputs.branch }}
106106
ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}
107+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}
108+
cache-to: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }},mode=max
107109
nightly-docker-rootless:
108110
runs-on: namespace-profile-gitea-release-docker
109111
permissions:
@@ -152,3 +154,5 @@ jobs:
152154
tags: |-
153155
gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
154156
ghcr.io/go-gitea/gitea:${{ steps.clean_name.outputs.branch }}-rootless
157+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}-rootless
158+
cache-to: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}-rootless,mode=max

.github/workflows/release-tag-rc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
push: true
109109
tags: ${{ steps.meta.outputs.tags }}
110110
labels: ${{ steps.meta.outputs.labels }}
111+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}
111112
docker-rootless:
112113
runs-on: namespace-profile-gitea-release-docker
113114
permissions:
@@ -152,3 +153,4 @@ jobs:
152153
file: Dockerfile.rootless
153154
tags: ${{ steps.meta.outputs.tags }}
154155
labels: ${{ steps.meta.outputs.labels }}
156+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}-rootless

.github/workflows/release-tag-version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
push: true
117117
tags: ${{ steps.meta.outputs.tags }}
118118
labels: ${{ steps.meta.outputs.labels }}
119+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}
119120
docker-rootless:
120121
runs-on: namespace-profile-gitea-release-docker
121122
steps:
@@ -163,3 +164,4 @@ jobs:
163164
file: Dockerfile.rootless
164165
tags: ${{ steps.meta.outputs.tags }}
165166
labels: ${{ steps.meta.outputs.labels }}
167+
cache-from: type=registry,ref=gitea/gitea:buildcache-${{ steps.clean_name.outputs.branch }}-rootless

0 commit comments

Comments
 (0)