From 657662461fbe372ef42483396d33fe1a8f909b81 Mon Sep 17 00:00:00 2001 From: Timofei Larkin Date: Mon, 21 Jul 2025 12:53:11 +0300 Subject: [PATCH] [ci] Use OCIR for non-release PRs Changing the container registry from GHCR to OCIR will help with more flexibe image retention policies and removes the restrictions on the GitHub token when contributors submit PRs from forks. Release PRs remain on GHCR, as before. Signed-off-by: Timofei Larkin --- .github/workflows/pull-requests.yaml | 8 +++++--- scripts/common-envs.mk | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 262748d8..babe285f 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -1,5 +1,7 @@ name: Pull Request +env: + REGISTRY: ${{ secrets.OCIR_REPO }} on: pull_request: types: [opened, synchronize, reopened] @@ -33,9 +35,9 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ghcr.io + username: ${{ secrets.OCIR_USER}} + password: ${{ secrets.OCIR_TOKEN }} + registry: iad.ocir.io env: DOCKER_CONFIG: ${{ runner.temp }}/.docker diff --git a/scripts/common-envs.mk b/scripts/common-envs.mk index 98f4652a..bdff841b 100644 --- a/scripts/common-envs.mk +++ b/scripts/common-envs.mk @@ -1,4 +1,4 @@ -REGISTRY := ghcr.io/cozystack/cozystack +REGISTRY ?= ghcr.io/cozystack/cozystack PUSH := 1 LOAD := 0 COZYSTACK_VERSION = $(patsubst v%,%,$(shell git describe --tags))