@@ -3,16 +3,13 @@ name: Turtles release
33on :
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
139permissions :
1410 contents : write # to create releases
1511 id-token : write # to read vault secrets
12+ packages : write # to push to ghcr.io
1613
1714jobs :
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
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
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
0 commit comments