Skip to content

Commit 973a249

Browse files
committed
wip: try to publish
1 parent 458354d commit 973a249

1 file changed

Lines changed: 23 additions & 36 deletions

File tree

.github/workflows/build.yaml

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: ${{ github.repository }}
10-
CHART_NAME: ${{ github.repository }}/helm-chart
10+
CHART_NAME: ${{ github.repository }}/helm-chart-dev
1111

1212
defaults:
1313
run:
@@ -67,23 +67,23 @@ jobs:
6767
echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
6868
echo "image_repository=$IMAGE_REPOSITORY" >> "$GITHUB_OUTPUT"
6969
echo "image_tag=$IMAGE_TAG" >> "$GITHUB_OUTPUT"
70-
# - name: Set up Docker buildx
71-
# uses: docker/setup-buildx-action@v3
72-
# - name: Set up Docker
73-
# uses: docker/login-action@v3
74-
# with:
75-
# registry: ${{ env.REGISTRY }}
76-
# username: ${{ github.actor }}
77-
# password: ${{ secrets.GITHUB_TOKEN }}
78-
# - name: Build and push Docker image
79-
# uses: docker/build-push-action@v6
80-
# with:
81-
# context: .
82-
# push: true
83-
# tags: ${{ steps.meta.outputs.tags }}
84-
# labels: ${{ steps.meta.outputs.labels }}
85-
# cache-from: type=registry,ref=${{ steps.docker_image.outputs.image_repository }}:buildcache
86-
# cache-to: type=registry,ref=${{ steps.docker_image.outputs.image_repository }}:buildcache,mode=max
70+
- name: Set up Docker buildx
71+
uses: docker/setup-buildx-action@v3
72+
- name: Set up Docker
73+
uses: docker/login-action@v3
74+
with:
75+
registry: ${{ env.REGISTRY }}
76+
username: ${{ github.actor }}
77+
password: ${{ secrets.GITHUB_TOKEN }}
78+
- name: Build and push Docker image
79+
uses: docker/build-push-action@v6
80+
with:
81+
context: .
82+
push: true
83+
tags: ${{ steps.meta.outputs.tags }}
84+
labels: ${{ steps.meta.outputs.labels }}
85+
cache-from: type=registry,ref=${{ steps.docker_image.outputs.image_repository }}:buildcache
86+
cache-to: type=registry,ref=${{ steps.docker_image.outputs.image_repository }}:buildcache,mode=max
8787

8888
publish-chart:
8989
needs: [build-image]
@@ -107,22 +107,9 @@ jobs:
107107
- name: Update chart
108108
run: |
109109
helm dep update deploy/csi-rclone
110-
chartpress --no-build --image-prefix "${{ needs.build-image.outputs.image_repository }}/" --tag "${{ needs.build-image.outputs.image_tag }}"
110+
chartpress --no-build --image-prefix "${{ env.REGISTRY }}/" --tag "${{ needs.build-image.outputs.image_tag }}"
111111
helm lint deploy/csi-rclone
112-
# - name: Publish chart
113-
114-
# - name: Publish chart
115-
# env:
116-
# DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
117-
# DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
118-
# GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
119-
# run: |
120-
# git config --global user.email "renku@datascience.ch"
121-
# git config --global user.name "Renku Bot"
122-
# export TAG=$(echo ${GITHUB_REF} |cut -d/ -f3)
123-
# docker buildx create --name multiarch --use
124-
# docker buildx inspect --bootstrap
125-
# helm dep update deploy/csi-rclone
126-
# chartpress --tag $TAG --platform linux/amd64 --platform linux/arm64 --builder docker-buildx
127-
# helm lint deploy/csi-rclone
128-
# chartpress --tag $TAG --platform linux/amd64 --platform linux/arm64 --builder docker-buildx --push --publish-chart
112+
- name: Publish chart
113+
run: |
114+
helm package deploy/csi-rclone
115+
helm push "csi-rclone-${{ needs.build-image.outputs.image_tag }}.tgz" "oci://${{ env.REGISTRY }}/${{ env.CHART_NAME }}"

0 commit comments

Comments
 (0)