Skip to content

Commit 2e81a58

Browse files
committed
fix image
1 parent abdec5f commit 2e81a58

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/build.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: ${{ github.repository }}
10+
CHART_REPO: helm-charts-dev
1011

1112
defaults:
1213
run:
@@ -26,6 +27,7 @@ jobs:
2627
image: ${{ steps.docker_image.outputs.image }}
2728
image_repository: ${{ steps.docker_image.outputs.image_repository }}
2829
image_tag: ${{ steps.docker_image.outputs.image_tag }}
30+
image_registry: $${{ steps.docker_image.outputs.image_registry }}
2931
permissions:
3032
contents: read
3133
packages: write
@@ -59,13 +61,16 @@ jobs:
5961
run: |
6062
IMAGE=$(echo '${{ steps.meta.outputs.json }}' | jq -cr '.tags[0]')
6163
echo "IMAGE=${IMAGE}"
62-
IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -d":" -f1)
64+
IMAGE_REPOSITORY=$(echo "$IMAGE" | cut -':' -f1)
6365
echo "IMAGE_REPOSITORY=${IMAGE_REPOSITORY}"
64-
IMAGE_TAG=$(echo "$IMAGE" | cut -d":" -f2)
66+
IMAGE_TAG=$(echo "$IMAGE" | cut -d':' -f2)
6567
echo "IMAGE_TAG=${IMAGE_TAG}"
68+
IMAGE_REGISTRY=$(echo "${IMAGE_REPOSITORY}" | rev | cut -d'/' -f2- | rev)
69+
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY}"
6670
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
6771
echo "image_repository=$IMAGE_REPOSITORY" >> "$GITHUB_OUTPUT"
6872
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
73+
echo "image_registry=$IMAGE_REGISTRY" >> "$GITHUB_OUTPUT"
6974
- name: Set up Docker buildx
7075
uses: docker/setup-buildx-action@v3
7176
- name: Set up Docker
@@ -109,9 +114,9 @@ jobs:
109114
- name: Update chart
110115
run: |
111116
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 }}"
113118
helm lint deploy/csi-rclone
114119
- name: Publish chart
115120
run: |
116121
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

Comments
 (0)