Skip to content

Commit

Permalink
Merge branch 'main' into allow-secret-extra-env
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Ray <[email protected]>
  • Loading branch information
mattray authored Jul 31, 2024
2 parents 06cfed2 + f31732b commit ce77f4f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

- uses: azure/setup-helm@v3
- uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with:
version: 'v3.15.2'

- uses: actions/setup-python@v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: '3.9'
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected]
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1

- name: List changed charts
id: list-changed
Expand All @@ -49,7 +49,7 @@ jobs:
run: ct lint --debug --config ./.github/configs/ct.yaml --lint-conf ./.github/configs/lintconf.yaml

- name: Create kind cluster
uses: helm/[email protected]
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3

- name: Configure Git
run: |
Expand All @@ -39,29 +39,36 @@ jobs:
run: |
helm-docs .
- name: Login to GHCR
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${ GITHUB_REPOSITORY_OWNER }
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run chart-releaser
uses: helm/chart-releaser-action@1.6.0
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
with:
charts_dir: charts
config: './.github/configs/cr.yaml'
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
CR_RELEASE_NAME_TEMPLATE: '{{ .Version }}-helm'
- uses: sigstore/[email protected]

- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
- name: Push chart to GHCR
env:
COSIGN_EXPERIMENTAL: 1
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 |& tee .digest
cosign sign $(cat .digest | awk -F "[, ]+" '/Pushed/{print $NF}')
cosign sign --yes $(cat .digest | awk -F "[, ]+" '/Pushed/{print $NF}')
done
- uses: oras-project/setup-oras@ca28077386065e263c03428f4ae0c09024817c93 # v1
with:
version: 1.2.0
- name: Push chart to GHCR
run: |
oras push ghcr.io/"${GITHUB_REPOSITORY_OWNER}"/charts/opencost \
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8
with:
stale-issue-message: 'This issue has been marked as stale because it has been open for 180 days with no activity. Please remove the stale label or comment or this issue will be closed in 5 days.'
close-issue-message: 'This issue was closed because it has been inactive for 185 days with no activity.'
Expand Down
13 changes: 13 additions & 0 deletions artifacthub-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Artifact Hub repository metadata file
#
# Some settings like the verified publisher flag or the ignored packages won't
# be applied until the next time the repository is processed. Please keep in
# mind that the repository won't be processed if it has not changed since the
# last time it was processed. Depending on the repository kind, this is checked
# in a different way. For Helm http based repositories, we consider it has
# changed if the `index.yaml` file changes. For git based repositories, it does
# when the hash of the last commit in the branch you set up changes. This does
# NOT apply to ownership claim operations, which are processed immediately.
#
# Repository: opencost-oci
repositoryID: fc0e734e-ecc9-4351-96e6-0c8934a1b8b1

0 comments on commit ce77f4f

Please sign in to comment.