Files
helm-charts-hardened/.github/workflows/helm-release.yaml
T
dependabot[bot] 3df67dbbc0 Bump sigstore/cosign-installer from 3.0.3 to 3.0.4 (#286)
Bumps
[sigstore/cosign-installer](https://github.com/sigstore/cosign-installer)
from 3.0.3 to 3.0.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sigstore/cosign-installer/releases">sigstore/cosign-installer's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.4</h2>
<ul>
<li>Include fix for <a
href="https://redirect.github.com/sigstore/cosign-installer/pull/124">sigstore/cosign-installer#124</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/03d0fecf172873164a163bbc64bed0f3bf114ed7"><code>03d0fec</code></a>
Fix unsafe evaluation of inputs.use-sudo (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/124">#124</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/46b5db744906311fb5af96dec633d262d16dfb5b"><code>46b5db7</code></a>
use intermediate environment variables to avoid risks of script
injection (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/122">#122</a>)</li>
<li><a
href="https://github.com/sigstore/cosign-installer/commit/84448ba515b2a5ac9853582a471184394c67631b"><code>84448ba</code></a>
we should rely upon the digests not the tags, typos (<a
href="https://redirect.github.com/sigstore/cosign-installer/issues/121">#121</a>)</li>
<li>See full diff in <a
href="https://github.com/sigstore/cosign-installer/compare/v3.0.3...v3.0.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigstore/cosign-installer&package-manager=github_actions&previous-version=3.0.3&new-version=3.0.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 01:04:16 -07:00

69 lines
2.0 KiB
YAML

name: Release Helm Charts
on:
push:
branches:
- release
paths:
- '.github/workflows/helm-release.yml'
- 'charts/**'
jobs:
release:
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Setup cosign
uses: sigstore/[email protected]
with:
cosign-release: v2.0.2
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.10.3
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push charts to GHCR and sign
# 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}"/helm-charts |& tee .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}"/helm-charts/"${name}"@"${digest}"
done