Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable ghcr uploads #2841

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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