diff --git a/.github/workflows/pull-docker-dryrun.yml b/.github/workflows/pull-docker-dryrun.yml index 205fa4e87d..7c7227bae1 100644 --- a/.github/workflows/pull-docker-dryrun.yml +++ b/.github/workflows/pull-docker-dryrun.yml @@ -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 diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index e6a2017068..2a9344c2b7 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -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 diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml index 73551628b1..98a2950e3b 100644 --- a/.github/workflows/release-tag-rc.yml +++ b/.github/workflows/release-tag-rc.yml @@ -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 diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.yml index eb16867150..58c95458ea 100644 --- a/.github/workflows/release-tag-version.yml +++ b/.github/workflows/release-tag-version.yml @@ -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