|
7 | 7 | env: |
8 | 8 | REGISTRY: ghcr.io |
9 | 9 | IMAGE_NAME: ${{ github.repository }} |
| 10 | + CHART_REPO: helm-charts-dev |
10 | 11 |
|
11 | 12 | defaults: |
12 | 13 | run: |
|
26 | 27 | image: ${{ steps.docker_image.outputs.image }} |
27 | 28 | image_repository: ${{ steps.docker_image.outputs.image_repository }} |
28 | 29 | image_tag: ${{ steps.docker_image.outputs.image_tag }} |
| 30 | + image_registry: $${{ steps.docker_image.outputs.image_registry }} |
29 | 31 | permissions: |
30 | 32 | contents: read |
31 | 33 | packages: write |
@@ -59,13 +61,16 @@ jobs: |
59 | 61 | run: | |
60 | 62 | IMAGE=$(echo '${{ steps.meta.outputs.json }}' | jq -cr '.tags[0]') |
61 | 63 | echo "IMAGE=${IMAGE}" |
62 | | - IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -d":" -f1) |
| 64 | + IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -':' -f1) |
63 | 65 | echo "IMAGE_REPOSITORY=${IMAGE_REPOSITORY}" |
64 | | - IMAGE_TAG=$(echo "$IMAGE" | cut -d":" -f2) |
| 66 | + IMAGE_TAG=$(echo "$IMAGE" | cut -d':' -f2) |
65 | 67 | echo "IMAGE_TAG=${IMAGE_TAG}" |
| 68 | + IMAGE_REGISTRY=$(echo "${IMAGE_REPOSITORY}" | rev | cut -d'/' -f2- | rev) |
| 69 | + echo "IMAGE_REGISTRY=${IMAGE_REGISTRY}" |
66 | 70 | echo "image=$IMAGE" >> "$GITHUB_OUTPUT" |
67 | 71 | echo "image_repository=$IMAGE_REPOSITORY" >> "$GITHUB_OUTPUT" |
68 | 72 | echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT" |
| 73 | + echo "image_registry=$IMAGE_REGISTRY" >> "$GITHUB_OUTPUT" |
69 | 74 | - name: Set up Docker buildx |
70 | 75 | uses: docker/setup-buildx-action@v3 |
71 | 76 | - name: Set up Docker |
@@ -109,9 +114,9 @@ jobs: |
109 | 114 | - name: Update chart |
110 | 115 | run: | |
111 | 116 | helm dep update deploy/csi-rclone |
112 | | - chartpress --no-build --image-prefix "${{ env.REGISTRY }}/" --tag "${{ needs.build-image.outputs.image_tag }}" |
| 117 | + chartpress --no-build --image-prefix "${{ needs.build-image.outputs.image_registry }}/" --tag "${{ needs.build-image.outputs.image_tag }}" |
113 | 118 | helm lint deploy/csi-rclone |
114 | 119 | - name: Publish chart |
115 | 120 | run: | |
116 | 121 | helm package deploy/csi-rclone |
117 | | - helm push "csi-rclone-${{ needs.build-image.outputs.image_tag }}.tgz" "oci://${{ needs.build-image.outputs.image_repository }}/helm-charts-dev" |
| 122 | + helm push "csi-rclone-${{ needs.build-image.outputs.image_tag }}.tgz" "oci://${{ needs.build-image.outputs.image_repository }}/${{ env.CHART_REPO }}" |
0 commit comments