mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-06 23:23:23 +09:00
feat(installer): add Artifact Hub publication and linting
Publish repository metadata alongside stable charts so Artifact Hub can verify the publisher and exclude nightly versions. Tested with installer Helm checks, ah lint, and mocked publication success and failure paths. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
8 files changed
+189
-2
No files matched your search
@@ -0,0 +1,29 @@
|
||||
name: Artifact Hub metadata
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- 'packages/core/installer/**'
|
||||
- '.github/workflows/artifacthub.yaml'
|
||||
|
||||
concurrency:
|
||||
group: artifacthub-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
artifacthub:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: artifacthub/ah:v1.24.0@sha256:97a90dba76f9cf550f0f93187222505ba104e3af72ab4a7bbe63b370aebaa6e7
|
||||
options: --user root
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Lint installer metadata
|
||||
run: ah lint --kind helm --path packages/core/installer
|
||||
@@ -497,6 +497,21 @@ jobs:
|
||||
"docker://${REGISTRY}/cozy-installer:latest"
|
||||
fi
|
||||
|
||||
- name: Set up ORAS
|
||||
if: ${{ !contains(steps.get_tag.outputs.tag, '-') }}
|
||||
uses: oras-project/setup-oras@ac735097e22fe643015b0d19645f7c9a69942128 # v2.0.4
|
||||
with:
|
||||
version: "1.4.0"
|
||||
|
||||
- name: Publish Artifact Hub metadata
|
||||
if: ${{ !contains(steps.get_tag.outputs.tag, '-') }}
|
||||
working-directory: packages/core/installer
|
||||
run: |
|
||||
oras push "${REGISTRY}/cozy-installer:artifacthub.io" \
|
||||
--annotation org.opencontainers.image.source=https://github.com/cozystack/cozystack \
|
||||
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
|
||||
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
|
||||
|
||||
# Last on purpose: the release page is what announces this version, so it
|
||||
# goes public only once the stable images and chart it points at exist. A
|
||||
# failed retag leaves the draft in place, where a re-run finds it again.
|
||||
|
||||
Reference in new issue
Block a user