From ba3eead654a7f08c0a16c8441f4a67a03f3cef11 Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Tue, 9 Apr 2024 08:58:18 +0200 Subject: [PATCH] Add artifacthub-repo.yml to verify repository --- .github/workflows/artifacthub.yaml | 28 ++++++++++++++++++++++++++++ .github/workflows/release.yaml | 1 + charts/spegel/artifacthub-repo.yml | 4 ++++ 3 files changed, 33 insertions(+) create mode 100644 .github/workflows/artifacthub.yaml create mode 100644 charts/spegel/artifacthub-repo.yml diff --git a/.github/workflows/artifacthub.yaml b/.github/workflows/artifacthub.yaml new file mode 100644 index 00000000..9887a389 --- /dev/null +++ b/.github/workflows/artifacthub.yaml @@ -0,0 +1,28 @@ +name: artifacthub + +on: + push: + paths: ["charts/spegel/artifacthub-repo.yml"] + +permissions: + contents: read + packages: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v4 + with: + submodules: true + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup ORAS + uses: oras-project/setup-oras@v1 + - name: Push ArtifactHub artifact + run: oras push ghcr.io/spegel-org/helm-charts/spegel:artifacthub.io --config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml charts/spegel/artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 14173068..e3d79563 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -65,6 +65,7 @@ jobs: - name: Publish Helm chart to GHCR id: helm run: | + rm charts/spegel/artifacthub-repo.yml yq -i '.image.digest = "${{ steps.build.outputs.DIGEST }}"' charts/spegel/values.yaml helm package --app-version ${{ steps.prep.outputs.VERSION }} --version ${{ steps.prep.outputs.VERSION }} charts/spegel helm push spegel-${{ steps.prep.outputs.VERSION }}.tgz oci://ghcr.io/spegel-org/helm-charts 2> .digest diff --git a/charts/spegel/artifacthub-repo.yml b/charts/spegel/artifacthub-repo.yml new file mode 100644 index 00000000..18bdbda3 --- /dev/null +++ b/charts/spegel/artifacthub-repo.yml @@ -0,0 +1,4 @@ +repositoryID: 8122016b-c465-4eaf-be87-f51423aa76f1 +owners: + - name: Philip Laine + email: philip.laine@gmail.com