Skip to content

Commit

Permalink
test-6
Browse files Browse the repository at this point in the history
  • Loading branch information
mguptahub committed Sep 4, 2024
1 parent 13f7ed7 commit 29a8a18
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/chart-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,13 @@ jobs:
CR_KEY: ${{ env.GPG_KEY_NAME }}
CR_PASSPHRASE_FILE: ${{env.GNUPGHOME}}/gpg-passphrase
CR_KEYRING: ${{env.GNUPGHOME}}/secring.gpg
HELM_REPO: helm-preview
run: |
flatBranchName=$(echo "${{ github.ref_name}}" | sed 's/\//\-/g')
sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml
sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml
# sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml
helm package --sign --key "$CR_KEY" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts
cp charts/${{env.CHART_REPO}}/README.md ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/${{env.CHART_REPO}}.md
helm repo index ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}} --url oci://${{ vars.HARBOR_REGISTRY }}/${{ env.HELM_REPO }}
helm registry login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_TOKEN }} ${{ vars.HARBOR_REGISTRY }}
helm push ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts/${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}-*.tgz oci://${{ vars.HARBOR_REGISTRY }}/${{ env.HELM_REPO }}
- id: build-plane-enterprise
if: ${{ env.BUILD_PLANE_EE == 'true' }}
Expand All @@ -111,24 +105,24 @@ jobs:
CR_KEY: ${{ env.GPG_KEY_NAME }}
CR_PASSPHRASE_FILE: ${{env.GNUPGHOME}}/gpg-passphrase
CR_KEYRING: ${{env.GNUPGHOME}}/secring.gpg
HELM_REPO: helm-preview
run: |
flatBranchName=$(echo "${{ github.ref_name}}" | sed 's/\//\-/g')
sed -i "s/name: ${{env.CHART_REPO}}/name: ${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}/" charts/${{env.CHART_REPO}}/Chart.yaml
sed -i "s/description: .*/description: ${flatBranchName}/g" charts/${{env.CHART_REPO}}/Chart.yaml
# sed -i "s/version: \(.*\)/version: \1-${flatBranchName}/" charts/${{env.CHART_REPO}}/Chart.yaml
helm package --sign --key "$CR_KEY" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts
cp charts/${{env.CHART_REPO}}/README.md ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/${{env.CHART_REPO}}.md
helm repo index ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}} --url oci://${{ vars.HARBOR_REGISTRY }}/${{ env.HELM_REPO }}
helm registry login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_TOKEN }} ${{ vars.HARBOR_REGISTRY }}
helm push ${{ env.EXPORT_DIR }}/${{env.CHART_REPO}}/charts/${{ env.CHART_PREFIX }}-${{env.CHART_REPO}}-*.tgz oci://${{ vars.HARBOR_REGISTRY }}/${{ env.HELM_REPO }}
helm package --sign --key "$CR_KEY" --keyring $CR_KEYRING --passphrase-file "$CR_PASSPHRASE_FILE" charts/$CHART_REPO -u -d ${{ env.EXPORT_DIR }}
- name: Publish
if: ${{ env.BUILD_PLANE_CE == 'true' || env.BUILD_PLANE_EE == 'true' }}
working-directory: code
env:
EXPORT_DIR: ${{env.PREVIEW_BUILD_FOLDER}}
HELM_REPO: helm-preview
run: |
helm repo index ${{ env.EXPORT_DIR }} --url oci://${{ vars.HARBOR_REGISTRY }}/${{ env.HELM_REPO }}
helm registry login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_TOKEN }} ${{ vars.HARBOR_REGISTRY }}
helm push ${{ env.EXPORT_DIR }}/${{ env.CHART_PREFIX }}-*.tgz oci://${{ vars.HARBOR_REGISTRY }}/${{ env.HELM_REPO }}
# helm repo index ${{env.PREVIEW_BUILD_FOLDER}}
touch ${{env.PREVIEW_BUILD_FOLDER}}/index.html
Expand Down

0 comments on commit 29a8a18

Please sign in to comment.