Skip to content

Commit b886fa9

Browse files
chore: fork test overrides, do not merge upstream
1 parent 9c759d6 commit b886fa9

3 files changed

Lines changed: 39 additions & 40 deletions

File tree

.github/workflows/chart-release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ jobs:
4444
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
4545
4646
- name: Package operator chart
47-
run: RELEASE_TAG=${GITHUB_REF##*/} CHART_PACKAGE_DIR=${{ inputs.release_dir }} CONTROLLER_IMG="${{ inputs.org }}/${{ inputs.image }}" ORG=${{ inputs.org }} make release
47+
run: |
48+
# TEST FORK OVERRIDE: PREVIOUS_TAG fallback + skip notes (no PRs in fork)
49+
PREV_TAG=$(git describe --abbrev=0 --exclude ${GITHUB_REF##*/} --exclude 'examples/*' 2>/dev/null || echo "v0.0.0-test")
50+
RELEASE_TAG=${GITHUB_REF##*/} \
51+
PREVIOUS_TAG=${PREV_TAG} \
52+
CHART_PACKAGE_DIR=${{ inputs.release_dir }} \
53+
CONTROLLER_IMG="${{ inputs.org }}/${{ inputs.image }}" \
54+
ORG=${{ inputs.org }} \
55+
make release NOTES=/bin/true
4856
4957
- name: Install chart-releaser
5058
uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0

.github/workflows/release.yaml

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ name: Turtles release
33
on:
44
push:
55
tags:
6-
# This is just a temporary filter while we maintain two release workflows.
7-
# TODO: change to "v*" when this becomes the only one.
8-
- "v0.2[5-9].*"
9-
- "v0.[3-9]*"
10-
- "v[1-9]*"
6+
- "v*-test"
117
workflow_dispatch:
128

139
permissions:
1410
contents: write # to create releases
1511
id-token: write # to read vault secrets
12+
packages: write # to push to ghcr.io
1613

1714
jobs:
1815
release:
@@ -32,16 +29,14 @@ jobs:
3229
with:
3330
fetch-depth: 0
3431

35-
- name: Read Vault secrets
36-
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6
37-
with:
38-
secrets: |
39-
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
40-
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ;
41-
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials registry | STAGE_REGISTRY ;
42-
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials username | STAGE_REGISTRY_USERNAME ;
43-
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials password | STAGE_REGISTRY_PASSWORD ;
44-
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials registry | PRIME_REGISTRY ;
32+
- name: Set test credentials
33+
run: |
34+
echo "DOCKER_USERNAME=furkat007" >> $GITHUB_ENV
35+
echo "DOCKER_PASSWORD=${{ secrets.DOCKER_PASSWORD }}" >> $GITHUB_ENV
36+
echo "STAGE_REGISTRY=ghcr.io" >> $GITHUB_ENV
37+
echo "STAGE_REGISTRY_USERNAME=furkatgofurov7" >> $GITHUB_ENV
38+
echo "STAGE_REGISTRY_PASSWORD=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
39+
echo "PRIME_REGISTRY=ghcr.io" >> $GITHUB_ENV
4540
4641
- name: Push community image to DockerHub
4742
uses: rancher/ecm-distro-tools/actions/publish-image@5d6e63896fea85836b2fca6dfb9236bcefe2aaa5
@@ -50,7 +45,7 @@ jobs:
5045
tag: ${{ env.TAG }}-${{ matrix.tag-suffix }}
5146
platforms: ${{ matrix.platform }}
5247
push-to-prime: false
53-
public-repo: rancher
48+
public-repo: furkat007
5449
public-username: ${{ env.DOCKER_USERNAME }}
5550
public-password: ${{ env.DOCKER_PASSWORD }}
5651
make-target: push-image
@@ -62,7 +57,7 @@ jobs:
6257
tag: ${{ env.TAG }}-${{ matrix.tag-suffix }}
6358
platforms: ${{ matrix.platform }}
6459
push-to-public: false
65-
prime-repo: rancher
60+
prime-repo: furkatgofurov7
6661
identity-registry: ${{ env.PRIME_REGISTRY }}
6762
prime-registry: ${{ env.STAGE_REGISTRY }}
6863
prime-username: ${{ env.STAGE_REGISTRY_USERNAME }}
@@ -81,16 +76,14 @@ jobs:
8176
needs:
8277
- release
8378
steps:
84-
- name: Read Vault secrets
85-
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6
86-
with:
87-
secrets: |
88-
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
89-
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ;
90-
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials registry | STAGE_REGISTRY ;
91-
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials username | STAGE_REGISTRY_USERNAME ;
92-
secret/data/github/repo/${{ github.repository }}/rancher-prime-stg-registry/credentials password | STAGE_REGISTRY_PASSWORD ;
93-
secret/data/github/repo/${{ github.repository }}/rancher-prime-registry/credentials registry | PRIME_REGISTRY ;
79+
- name: Set test credentials
80+
run: |
81+
echo "DOCKER_USERNAME=furkat007" >> $GITHUB_ENV
82+
echo "DOCKER_PASSWORD=${{ secrets.DOCKER_PASSWORD }}" >> $GITHUB_ENV
83+
echo "STAGE_REGISTRY=ghcr.io" >> $GITHUB_ENV
84+
echo "STAGE_REGISTRY_USERNAME=furkatgofurov7" >> $GITHUB_ENV
85+
echo "STAGE_REGISTRY_PASSWORD=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
86+
echo "PRIME_REGISTRY=ghcr.io" >> $GITHUB_ENV
9487
9588
- name: Log into Docker Hub registry
9689
if: ${{ matrix.image-type == 'community' }}
@@ -110,29 +103,27 @@ jobs:
110103
- name: Create multi-platform image and push
111104
shell: bash
112105
run: |
113-
IMAGE="turtles"
114106
if [ "${{ matrix.image-type }}" = "community" ]; then
115-
URL="docker.io/rancher/${IMAGE}:${{ env.TAG }}"
107+
IMAGE="turtles"
108+
URL="docker.io/furkat007/${IMAGE}:${{ env.TAG }}"
116109
docker buildx imagetools create -t "${URL}" \
117110
"${URL}-linux-amd64" \
118111
"${URL}-linux-arm64"
119112
echo "Pushed multi-platform image: ${URL}"
120113
elif [ "${{ matrix.image-type }}" = "prime" ]; then
121-
URL="${{ env.STAGE_REGISTRY }}/rancher/${IMAGE}:${{ env.TAG }}"
114+
IMAGE="turtles"
115+
URL="${{ env.STAGE_REGISTRY }}/furkatgofurov7/${IMAGE}:${{ env.TAG }}"
122116
docker buildx imagetools create -t "${URL}" \
123117
"${URL}-linux-amd64" \
124118
"${URL}-linux-arm64"
125119
echo "Pushed multi-platform image: ${URL}"
126120
127-
# Extract the multi-platform image digest for signing
128121
docker pull ${URL}
129122
IMAGE_DIGEST=$( docker inspect --format='{{index .RepoDigests 0}}' ${URL} | sed 's/.*@//' )
130-
# Set as environment variable for next steps
131-
MULTI_PLATFORM_IMAGE="${{ env.STAGE_REGISTRY }}/rancher/${IMAGE}@${IMAGE_DIGEST}"
123+
MULTI_PLATFORM_IMAGE="${{ env.STAGE_REGISTRY }}/furkatgofurov7/${IMAGE}@${IMAGE_DIGEST}"
132124
echo "MULTI_PLATFORM_IMAGE"=${MULTI_PLATFORM_IMAGE} >> "$GITHUB_ENV"
133125
134-
# Also set a tag-specific variable for provenance attestation step
135-
MULTI_PLATFORM_IMAGE_TAG="${{ env.STAGE_REGISTRY }}/rancher/${IMAGE}:${{ env.TAG }}@${IMAGE_DIGEST}"
126+
MULTI_PLATFORM_IMAGE_TAG="${{ env.STAGE_REGISTRY }}/furkatgofurov7/${IMAGE}:${{ env.TAG }}@${IMAGE_DIGEST}"
136127
echo "MULTI_PLATFORM_IMAGE_TAG"=${MULTI_PLATFORM_IMAGE_TAG} >> "$GITHUB_ENV"
137128
fi
138129
@@ -151,7 +142,7 @@ jobs:
151142
cosign sign \
152143
--oidc-provider=github-actions \
153144
--yes \
154-
--sign-container-identity="${{ env.PRIME_REGISTRY }}/rancher/turtles" \
145+
--sign-container-identity="${{ env.PRIME_REGISTRY }}/furkatgofurov7/turtles" \
155146
"${MULTI_PLATFORM_IMAGE}"
156147
157148
- name: Attest provenance
@@ -184,6 +175,6 @@ jobs:
184175
- merge
185176
with:
186177
tag: ${{ github.ref_name }}
187-
org: rancher
178+
org: furkat007
188179
image: turtles
189-
secrets: inherit
180+
secrets: inherit

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ endif
2828

2929
GO_VERSION ?= $(shell grep "go " go.mod | head -1 |awk '{print $$NF}')
3030
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
31-
REPO ?= rancher/turtles
31+
REPO ?= furkatgofurov7/turtles
3232

3333
CAPI_VERSION ?= $(shell grep "sigs.k8s.io/cluster-api" go.mod | head -1 |awk '{print $$NF}')
3434
CAPI_UPSTREAM_REPO ?= https://github.com/kubernetes-sigs/cluster-api

0 commit comments

Comments
 (0)