1 parent
1c12c1cc72
commit
28bc0538f0
3 files changed
+25
-4
No files matched your search
@@ -20,7 +20,8 @@ permissions:
|
||||
jobs:
|
||||
push-image-to-container-registry:
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.repository == 'rook/rook'
|
||||
# Run in upstream rook/rook or fork subhamkrai/rook
|
||||
if: github.repository == 'rook/rook' || github.repository == 'subhamkrai/rook'
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
@@ -95,6 +96,15 @@ jobs:
|
||||
BRANCH_NAME: ${{ env.BRANCH_NAME }}
|
||||
AWS_USR: ${{ secrets.AWS_USR }}
|
||||
AWS_PSW: ${{ secrets.AWS_PSW }}
|
||||
GITHUB_REF: $ {{ env.GITHUB_REF }}
|
||||
GITHUB_REF: ${{ env.GITHUB_REF }}
|
||||
run: |
|
||||
# Fork: push only to GHCR (no Docker Hub/Quay). Upstream unchanged.
|
||||
if [ "${{ github.repository }}" != "rook/rook" ]; then
|
||||
export GHCR_REGISTRY="ghcr.io/${{ github.repository_owner }}"
|
||||
export DOCKER_REGISTRY="ghcr.io/${{ github.repository_owner }}"
|
||||
export QUAY_REGISTRY="ghcr.io/${{ github.repository_owner }}"
|
||||
export REGISTRIES="ghcr.io/${{ github.repository_owner }}"
|
||||
[ -n "${{ secrets.S3_BUCKET_FORK }}" ] && export S3_BUCKET="${{ secrets.S3_BUCKET_FORK }}"
|
||||
[ -n "${{ secrets.HELM_S3_BUCKET_FORK }}" ] && export HELM_S3_BUCKET="${{ secrets.HELM_S3_BUCKET_FORK }}"
|
||||
fi
|
||||
tests/scripts/build-release.sh
|
||||
@@ -56,6 +56,8 @@ FLAVORS ?= output images docs helm charts
|
||||
DOCKER_REGISTRY ?= docker.io/rook
|
||||
QUAY_REGISTRY ?= quay.io/rook
|
||||
GHCR_REGISTRY ?= ghcr.io/rook
|
||||
# Allow override from env (e.g. fork: REGISTRIES=ghcr.io/owner)
|
||||
ifeq ($(origin REGISTRIES),undefined)
|
||||
ifeq ($(TAGGED_RELEASE),false)
|
||||
# Publish always to dockerhub, including master and interim builds
|
||||
REGISTRIES = $(DOCKER_REGISTRY)
|
||||
@@ -63,6 +65,7 @@ else
|
||||
# Publish the images to all registries for tagged releases
|
||||
REGISTRIES = $(DOCKER_REGISTRY) $(QUAY_REGISTRY) $(GHCR_REGISTRY)
|
||||
endif
|
||||
endif
|
||||
IMAGE_ARCHS := $(subst linux_,,$(filter linux_%,$(PLATFORMS)))
|
||||
IMAGE_PLATFORMS := $(subst _,/,$(subst $(SPACE),$(COMMA),$(filter linux_%,$(PLATFORMS))))
|
||||
IMAGE_PLATFORMS_COMMA := $(shell echo "$(IMAGE_PLATFORMS)" | sed 's/ /,/g' | sed 's/.$$//')
|
||||
|
||||
@@ -36,9 +36,17 @@ if [ -f .env ]; then
|
||||
export $(grep -v '^#' .env | xargs -d '\n')
|
||||
fi
|
||||
|
||||
# Use Git access token for accessing the docs repo if set
|
||||
# Use Git access token for accessing the docs repo if set.
|
||||
# In GitHub Actions when not in upstream rook/rook, default to fork's docs repo.
|
||||
# shellcheck disable=SC2034
|
||||
export DOCS_GIT_REPO="${DOCS_GIT_REPO:-git@github.com:rook/rook.github.io.git}"
|
||||
if [ -z "${DOCS_GIT_REPO:-}" ]; then
|
||||
if [ -n "${GITHUB_REPOSITORY:-}" ] && [ "${GITHUB_REPOSITORY}" != "rook/rook" ]; then
|
||||
DOCS_GIT_REPO="git@github.com:${GITHUB_REPOSITORY_OWNER:-unknown}/rook.github.io.git"
|
||||
else
|
||||
DOCS_GIT_REPO="git@github.com:rook/rook.github.io.git"
|
||||
fi
|
||||
fi
|
||||
export DOCS_GIT_REPO
|
||||
if [ -n "${GIT_API_TOKEN}" ]; then
|
||||
DOCS_GIT_REPO="${DOCS_GIT_REPO//git@/}"
|
||||
DOCS_GIT_REPO="${DOCS_GIT_REPO//:/\/}"
|
||||
|
||||
Reference in new issue
Block a user