From d07c5cf69ce591a905a33cba93f2f90db8b86ded Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 18 Dec 2024 12:03:41 +0100 Subject: [PATCH] fix: actions move to data.forgejo.org code.forgejo.org is meant for development, the actions need to be highly available and can be read-only. This is what data.forgejo.org will provide. --- .forgejo/testdata/build-release/Dockerfile | 2 +- .../setup-cache-go/action.yaml | 2 +- .forgejo/workflows/backport.yml | 4 +- .../workflows/build-release-integration.yml | 2 +- .forgejo/workflows/build-release.yml | 12 ++-- .../workflows/cascade-setup-end-to-end.yml | 2 +- .../workflows/forgejo-integration-cleanup.yml | 2 +- .forgejo/workflows/merge-requirements.yml | 2 +- .forgejo/workflows/milestone.yml | 4 +- .forgejo/workflows/mirror.yml | 2 +- .forgejo/workflows/publish-release.yml | 8 +-- .../release-notes-assistant-milestones.yml | 6 +- .../workflows/release-notes-assistant.yml | 6 +- .forgejo/workflows/renovate.yml | 6 +- .forgejo/workflows/testing.yml | 56 +++++++++---------- modules/setting/actions.go | 2 +- modules/setting/actions_test.go | 2 +- 17 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.forgejo/testdata/build-release/Dockerfile b/.forgejo/testdata/build-release/Dockerfile index 4ef67d34e0..1116f459a9 100644 --- a/.forgejo/testdata/build-release/Dockerfile +++ b/.forgejo/testdata/build-release/Dockerfile @@ -1,4 +1,4 @@ -FROM code.forgejo.org/oci/alpine:3.20 +FROM data.forgejo.org/oci/alpine:3.20 ARG RELEASE_VERSION=unkown LABEL maintainer="contact@forgejo.org" \ org.opencontainers.image.version="${RELEASE_VERSION}" diff --git a/.forgejo/workflows-composite/setup-cache-go/action.yaml b/.forgejo/workflows-composite/setup-cache-go/action.yaml index adec8c7c4c..67372d9f36 100644 --- a/.forgejo/workflows-composite/setup-cache-go/action.yaml +++ b/.forgejo/workflows-composite/setup-cache-go/action.yaml @@ -17,7 +17,7 @@ runs: apt-get -q install -qq -y zstd - name: "Set up Go using setup-go" - uses: https://code.forgejo.org/actions/setup-go@v5 + uses: https://data.forgejo.org/actions/setup-go@v5 id: go-version with: go-version-file: "go.mod" diff --git a/.forgejo/workflows/backport.yml b/.forgejo/workflows/backport.yml index ca5191dbf2..795557dfac 100644 --- a/.forgejo/workflows/backport.yml +++ b/.forgejo/workflows/backport.yml @@ -40,14 +40,14 @@ jobs: ) runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' steps: - name: event info run: | cat <<'EOF' ${{ toJSON(github) }} EOF - - uses: https://code.forgejo.org/actions/git-backporting@v4.8.4 + - uses: https://data.forgejo.org/actions/git-backporting@v4.8.4 with: target-branch-pattern: "^backport/(?(v.*))$" strategy: ort diff --git a/.forgejo/workflows/build-release-integration.yml b/.forgejo/workflows/build-release-integration.yml index 9604451d85..9afea0704e 100644 --- a/.forgejo/workflows/build-release-integration.yml +++ b/.forgejo/workflows/build-release-integration.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - id: forgejo - uses: https://code.forgejo.org/actions/setup-forgejo@v2.0.4 + uses: https://data.forgejo.org/actions/setup-forgejo@v2.0.4 with: user: root password: admin1234 diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml index 66f5cccd37..8251a2d38d 100644 --- a/.forgejo/workflows/build-release.yml +++ b/.forgejo/workflows/build-release.yml @@ -37,11 +37,11 @@ jobs: repository="${{ github.repository }}" echo "value=${repository##*/}" >> "$GITHUB_OUTPUT" - - uses: https://code.forgejo.org/actions/setup-node@v4 + - uses: https://data.forgejo.org/actions/setup-node@v4 with: node-version: 20 - - uses: https://code.forgejo.org/actions/setup-go@v5 + - uses: https://data.forgejo.org/actions/setup-go@v5 with: go-version-file: "go.mod" @@ -87,7 +87,7 @@ jobs: - name: cache node_modules id: node - uses: https://code.forgejo.org/actions/cache@v4 + uses: https://data.forgejo.org/actions/cache@v4 with: path: | node_modules @@ -158,7 +158,7 @@ jobs: - name: build container & release if: ${{ secrets.TOKEN != '' }} - uses: https://code.forgejo.org/forgejo/forgejo-build-publish/build@v5.2.1 + uses: https://data.forgejo.org/forgejo/forgejo-build-publish/build@v5.2.1 with: forgejo: "${{ env.GITHUB_SERVER_URL }}" owner: "${{ env.GITHUB_REPOSITORY_OWNER }}" @@ -177,7 +177,7 @@ jobs: - name: build rootless container if: ${{ secrets.TOKEN != '' }} - uses: https://code.forgejo.org/forgejo/forgejo-build-publish/build@v5.2.1 + uses: https://data.forgejo.org/forgejo/forgejo-build-publish/build@v5.2.1 with: forgejo: "${{ env.GITHUB_SERVER_URL }}" owner: "${{ env.GITHUB_REPOSITORY_OWNER }}" @@ -195,7 +195,7 @@ jobs: - name: end-to-end tests if: ${{ secrets.TOKEN != '' && vars.ROLE == 'forgejo-integration' && vars.SKIP_END_TO_END != 'true' }} - uses: https://code.forgejo.org/actions/cascading-pr@v2.2.0 + uses: https://data.forgejo.org/actions/cascading-pr@v2.2.0 with: origin-url: ${{ env.GITHUB_SERVER_URL }} origin-repo: ${{ github.repository }} diff --git a/.forgejo/workflows/cascade-setup-end-to-end.yml b/.forgejo/workflows/cascade-setup-end-to-end.yml index d5aada4284..710cd27ba4 100644 --- a/.forgejo/workflows/cascade-setup-end-to-end.yml +++ b/.forgejo/workflows/cascade-setup-end-to-end.yml @@ -35,7 +35,7 @@ jobs: ) runs-on: docker container: - image: code.forgejo.org/oci/node:20-bookworm + image: data.forgejo.org/oci/node:20-bookworm steps: - uses: actions/checkout@v4 with: diff --git a/.forgejo/workflows/forgejo-integration-cleanup.yml b/.forgejo/workflows/forgejo-integration-cleanup.yml index 049679a1eb..9cef5fac68 100644 --- a/.forgejo/workflows/forgejo-integration-cleanup.yml +++ b/.forgejo/workflows/forgejo-integration-cleanup.yml @@ -9,7 +9,7 @@ jobs: if: vars.ROLE == 'forgejo-integration' runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' steps: - name: apt install curl jq diff --git a/.forgejo/workflows/merge-requirements.yml b/.forgejo/workflows/merge-requirements.yml index d8a9618d2a..d5270321ad 100644 --- a/.forgejo/workflows/merge-requirements.yml +++ b/.forgejo/workflows/merge-requirements.yml @@ -16,7 +16,7 @@ jobs: if: vars.ROLE == 'forgejo-coding' runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' steps: - name: Debug output run: | diff --git a/.forgejo/workflows/milestone.yml b/.forgejo/workflows/milestone.yml index 56bd7ba28d..9a51c515d0 100644 --- a/.forgejo/workflows/milestone.yml +++ b/.forgejo/workflows/milestone.yml @@ -13,9 +13,9 @@ jobs: if: vars.ROLE == 'forgejo-coding' && github.event.pull_request.merged runs-on: docker container: - image: 'code.forgejo.org/oci/ci:1' + image: 'data.forgejo.org/oci/ci:1' steps: - - uses: https://code.forgejo.org/forgejo/set-milestone@v1.0.0 + - uses: https://data.forgejo.org/forgejo/set-milestone@v1.0.0 with: forgejo: https://codeberg.org repository: forgejo/forgejo diff --git a/.forgejo/workflows/mirror.yml b/.forgejo/workflows/mirror.yml index fd222115ac..888f7ec07d 100644 --- a/.forgejo/workflows/mirror.yml +++ b/.forgejo/workflows/mirror.yml @@ -11,7 +11,7 @@ jobs: if: ${{ secrets.MIRROR_TOKEN != '' }} runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' steps: - name: git push {v*/,}forgejo run: | diff --git a/.forgejo/workflows/publish-release.yml b/.forgejo/workflows/publish-release.yml index 6fc8e667bf..ccde654bf9 100644 --- a/.forgejo/workflows/publish-release.yml +++ b/.forgejo/workflows/publish-release.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v4 - name: copy & sign - uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v5.2.1 + uses: https://data.forgejo.org/forgejo/forgejo-build-publish/publish@v5.2.1 with: from-forgejo: ${{ vars.FORGEJO }} to-forgejo: ${{ vars.FORGEJO }} @@ -61,14 +61,14 @@ jobs: - name: get trigger mirror issue id: mirror - uses: https://code.forgejo.org/infrastructure/issue-action/get@v1.1.0 + uses: https://data.forgejo.org/infrastructure/issue-action/get@v1.1.0 with: forgejo: https://code.forgejo.org repository: forgejo/forgejo labels: mirror-trigger - name: trigger the mirror - uses: https://code.forgejo.org/infrastructure/issue-action/set@v1.1.0 + uses: https://data.forgejo.org/infrastructure/issue-action/set@v1.1.0 with: forgejo: https://code.forgejo.org repository: forgejo/forgejo @@ -78,7 +78,7 @@ jobs: label: trigger - name: upgrade v*.next.forgejo.org - uses: https://code.forgejo.org/infrastructure/next-digest@v1.1.0 + uses: https://data.forgejo.org/infrastructure/next-digest@v1.1.0 with: url: https://placeholder:${{ secrets.TOKEN_NEXT_DIGEST }}@code.forgejo.org/infrastructure/next-digest ref_name: '${{ github.ref_name }}' diff --git a/.forgejo/workflows/release-notes-assistant-milestones.yml b/.forgejo/workflows/release-notes-assistant-milestones.yml index 000aef741e..50b267ec14 100644 --- a/.forgejo/workflows/release-notes-assistant-milestones.yml +++ b/.forgejo/workflows/release-notes-assistant-milestones.yml @@ -9,11 +9,11 @@ jobs: if: vars.ROLE == 'forgejo-coding' runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - - uses: https://code.forgejo.org/actions/setup-go@v5 + - uses: https://data.forgejo.org/actions/setup-go@v5 with: go-version-file: "go.mod" cache: false diff --git a/.forgejo/workflows/release-notes-assistant.yml b/.forgejo/workflows/release-notes-assistant.yml index b5df074ceb..7217bf4d2b 100644 --- a/.forgejo/workflows/release-notes-assistant.yml +++ b/.forgejo/workflows/release-notes-assistant.yml @@ -12,9 +12,9 @@ jobs: if: ( vars.ROLE == 'forgejo-coding' ) && contains(github.event.pull_request.labels.*.name, 'worth a release-note') runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - name: event run: | @@ -25,7 +25,7 @@ jobs: ${{ toJSON(github.event) }} EOF - - uses: https://code.forgejo.org/actions/setup-go@v5 + - uses: https://data.forgejo.org/actions/setup-go@v5 with: go-version-file: "go.mod" cache: false diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml index dc9dc2200a..1d89adbf42 100644 --- a/.forgejo/workflows/renovate.yml +++ b/.forgejo/workflows/renovate.yml @@ -25,11 +25,11 @@ jobs: runs-on: docker container: - image: code.forgejo.org/forgejo-contrib/renovate:39.69.2 + image: data.forgejo.org/forgejo-contrib/renovate:39.69.2 steps: - name: Load renovate repo cache - uses: https://code.forgejo.org/actions/cache/restore@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: https://data.forgejo.org/actions/cache/restore@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: | .tmp/cache/renovate/repository @@ -62,7 +62,7 @@ jobs: - name: Save renovate repo cache if: always() && env.RENOVATE_DRY_RUN != 'full' - uses: https://code.forgejo.org/actions/cache/save@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + uses: https://data.forgejo.org/actions/cache/save@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 with: path: | .tmp/cache/renovate/repository diff --git a/.forgejo/workflows/testing.yml b/.forgejo/workflows/testing.yml index d40e785fa3..eb3163d3ae 100644 --- a/.forgejo/workflows/testing.yml +++ b/.forgejo/workflows/testing.yml @@ -13,7 +13,7 @@ jobs: if: vars.ROLE == 'forgejo-coding' || vars.ROLE == 'forgejo-testing' runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime steps: - name: event info @@ -21,7 +21,7 @@ jobs: cat <<'EOF' ${{ toJSON(github) }} EOF - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - run: su forgejo -c 'make deps-backend deps-tools' - run: su forgejo -c 'make --always-make -j$(nproc) lint-backend tidy-check swagger-check fmt-check swagger-validate' # ensure the "go-licenses" make target runs @@ -30,10 +30,10 @@ jobs: if: vars.ROLE == 'forgejo-coding' || vars.ROLE == 'forgejo-testing' runs-on: docker container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - run: make deps-frontend - run: make lint-frontend - run: make checks-frontend @@ -55,17 +55,17 @@ jobs: runs-on: docker needs: [backend-checks, frontend-checks] container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime services: elasticsearch: - image: code.forgejo.org/oci/bitnami/elasticsearch:7 + image: data.forgejo.org/oci/bitnami/elasticsearch:7 options: --tmpfs /bitnami/elasticsearch/data env: discovery.type: single-node ES_JAVA_OPTS: "-Xms512m -Xmx512m" minio: - image: code.forgejo.org/oci/bitnami/minio:2024.8.17 + image: data.forgejo.org/oci/bitnami/minio:2024.8.17 options: >- --hostname gitea.minio --tmpfs /bitnami/minio/data:noatime env: @@ -73,7 +73,7 @@ jobs: MINIO_ROOT_USER: 123456 MINIO_ROOT_PASSWORD: 12345678 steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - name: install git >= 2.42 uses: ./.forgejo/workflows-composite/apt-install-from @@ -96,10 +96,10 @@ jobs: runs-on: docker needs: [backend-checks, frontend-checks] container: - image: 'code.forgejo.org/oci/playwright:latest' + image: 'data.forgejo.org/oci/playwright:latest' options: --tmpfs /tmp:exec,noatime steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 with: fetch-depth: 20 - uses: ./.forgejo/workflows-composite/setup-env @@ -116,7 +116,7 @@ jobs: - uses: ./.forgejo/workflows-composite/build-backend - name: Get changed files id: changed-files - uses: https://code.forgejo.org/tj-actions/changed-files@v45 + uses: https://data.forgejo.org/tj-actions/changed-files@v45 with: separator: '\n' - run: | @@ -128,7 +128,7 @@ jobs: CHANGED_FILES: ${{steps.changed-files.outputs.all_changed_files}} - name: Upload test artifacts on failure if: failure() - uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + uses: https://data.forgejo.org/forgejo/upload-artifact@v4 with: name: test-artifacts.zip path: tests/e2e/test-artifacts/ @@ -138,20 +138,20 @@ jobs: runs-on: docker needs: [backend-checks, frontend-checks, test-unit] container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime name: ${{ format('test-remote-cacher ({0})', matrix.cacher.name) }} strategy: matrix: cacher: - name: redis - image: code.forgejo.org/oci/bitnami/redis:7.2 + image: data.forgejo.org/oci/bitnami/redis:7.2 options: --tmpfs /bitnami/redis/data:noatime - name: redict image: registry.redict.io/redict:7.3.0-scratch options: --tmpfs /data:noatime - name: valkey - image: code.forgejo.org/oci/bitnami/valkey:7.2 + image: data.forgejo.org/oci/bitnami/valkey:7.2 options: --tmpfs /bitnami/redis/data:noatime - name: garnet image: ghcr.io/microsoft/garnet-alpine:1.0.14 @@ -161,7 +161,7 @@ jobs: image: ${{ matrix.cacher.image }} options: ${{ matrix.cacher.options }} steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - name: install git >= 2.42 uses: ./.forgejo/workflows-composite/apt-install-from @@ -180,11 +180,11 @@ jobs: runs-on: docker needs: [backend-checks, frontend-checks] container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime services: mysql: - image: 'code.forgejo.org/oci/bitnami/mysql:8.4' + image: 'data.forgejo.org/oci/bitnami/mysql:8.4' env: ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: testgitea @@ -194,7 +194,7 @@ jobs: MYSQL_EXTRA_FLAGS: --innodb-adaptive-flushing=OFF --innodb-buffer-pool-size=4G --innodb-log-buffer-size=128M --innodb-flush-log-at-trx-commit=0 --innodb-flush-log-at-timeout=30 --innodb-flush-method=nosync --innodb-fsync-threshold=1000000000 --disable-log-bin options: --tmpfs /bitnami/mysql/data:noatime steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - name: install dependencies & git >= 2.42 uses: ./.forgejo/workflows-composite/apt-install-from @@ -211,19 +211,19 @@ jobs: runs-on: docker needs: [backend-checks, frontend-checks] container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime services: minio: - image: code.forgejo.org/oci/bitnami/minio:2024.8.17 + image: data.forgejo.org/oci/bitnami/minio:2024.8.17 env: MINIO_ROOT_USER: 123456 MINIO_ROOT_PASSWORD: 12345678 options: --tmpfs /bitnami/minio/data ldap: - image: code.forgejo.org/oci/test-openldap:latest + image: data.forgejo.org/oci/test-openldap:latest pgsql: - image: code.forgejo.org/oci/bitnami/postgresql:15 + image: data.forgejo.org/oci/bitnami/postgresql:15 env: POSTGRESQL_DATABASE: test POSTGRESQL_PASSWORD: postgres @@ -231,7 +231,7 @@ jobs: POSTGRESQL_EXTRA_FLAGS: -c full_page_writes=off options: --tmpfs /bitnami/postgresql steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - name: install dependencies & git >= 2.42 uses: ./.forgejo/workflows-composite/apt-install-from @@ -250,10 +250,10 @@ jobs: runs-on: docker needs: [backend-checks, frontend-checks] container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - name: install dependencies & git >= 2.42 uses: ./.forgejo/workflows-composite/apt-install-from @@ -278,10 +278,10 @@ jobs: - test-remote-cacher - test-unit container: - image: 'code.forgejo.org/oci/node:20-bookworm' + image: 'data.forgejo.org/oci/node:20-bookworm' options: --tmpfs /tmp:exec,noatime steps: - - uses: https://code.forgejo.org/actions/checkout@v4 + - uses: https://data.forgejo.org/actions/checkout@v4 - uses: ./.forgejo/workflows-composite/setup-env - run: su forgejo -c 'make deps-backend deps-tools' - run: su forgejo -c 'make security-check' diff --git a/modules/setting/actions.go b/modules/setting/actions.go index 8c1b57b649..52a3ad5309 100644 --- a/modules/setting/actions.go +++ b/modules/setting/actions.go @@ -46,7 +46,7 @@ func (url defaultActionsURL) URL() string { } const ( - defaultActionsURLForgejo = "https://code.forgejo.org" + defaultActionsURLForgejo = "https://data.forgejo.org" defaultActionsURLGitHub = "github" // https://github.com defaultActionsURLSelf = "self" // the root URL of the self-hosted instance ) diff --git a/modules/setting/actions_test.go b/modules/setting/actions_test.go index afd76d3bee..4bff6e02ad 100644 --- a/modules/setting/actions_test.go +++ b/modules/setting/actions_test.go @@ -117,7 +117,7 @@ func Test_getDefaultActionsURLForActions(t *testing.T) { iniStr: ` [actions] `, - wantURL: "https://code.forgejo.org", + wantURL: "https://data.forgejo.org", }, { name: "github",