Skip to content

Commit

Permalink
disable ghcr uploads (prometheus-community#2841)
Browse files Browse the repository at this point in the history
Signed-off-by: André Bauer <monotek@users.noreply.github.com>

Signed-off-by: André Bauer <monotek@users.noreply.github.com>
  • Loading branch information
monotek authored and Matiasmct committed May 16, 2023
1 parent d5ae218 commit 94cb3fd
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,30 @@ jobs:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

# see https://github.com/helm/chart-releaser/issues/183
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# # see https://github.com/helm/chart-releaser/issues/183
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- uses: sigstore/cosign-installer@v2.8.1
- name: Push charts to GHCR and sign
env:
COSIGN_EXPERIMENTAL: 1
# when filling gaps with previously released charts, cr would create
# nothing in .cr-release-packages/, and the original globbing character
# would be preserved, causing a non-zero exit. Set nullglob to fix this
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/"${GITHUB_REPOSITORY_OWNER}"/charts > .digest
file=${pkg##*/} # extracts file name from full directory path
name=${file%-*} # extracts chart name from filename
digest=$(awk -F "[, ]+" '/Digest/{print $NF}' < .digest)
cosign sign ghcr.io/"${GITHUB_REPOSITORY_OWNER}"/charts/"${name}"@"${digest}"
done
# - uses: sigstore/cosign-installer@v2.8.1
# - name: Push charts to GHCR and sign
# env:
# COSIGN_EXPERIMENTAL: 1
# # when filling gaps with previously released charts, cr would create
# # nothing in .cr-release-packages/, and the original globbing character
# # would be preserved, causing a non-zero exit. Set nullglob to fix this
# run: |
# shopt -s nullglob
# for pkg in .cr-release-packages/*; do
# if [ -z "${pkg:-}" ]; then
# break
# fi
# helm push "${pkg}" oci://ghcr.io/"${GITHUB_REPOSITORY_OWNER}"/charts > .digest
# file=${pkg##*/} # extracts file name from full directory path
# name=${file%-*} # extracts chart name from filename
# digest=$(awk -F "[, ]+" '/Digest/{print $NF}' < .digest)
# cosign sign ghcr.io/"${GITHUB_REPOSITORY_OWNER}"/charts/"${name}"@"${digest}"
# done

0 comments on commit 94cb3fd

Please sign in to comment.