v0.1.20 #20
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Reindex | |
| on: | |
| release: | |
| types: [released] | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| id-token: write | |
| pages: write | |
| contents: read | |
| jobs: | |
| reindex: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo snap install yq | |
| - name: Checkout repository | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| sparse-checkout: | | |
| artifacthub-repo.yaml | |
| - name: Generate Helm repository index.yaml | |
| run: | | |
| curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| "https://api.github.com/repos/${{ github.repository }}/releases" | \ | |
| yq -P '{ "apiVersion": "v1", "entries": { "collector": . | map({ "name": "collector", "urls": [ .assets[0].browser_download_url ], "version": .tag_name }) } }' >index.yaml | |
| - name: Create index.html redirect | |
| run: | | |
| cat > index.html << 'EOF' | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Better Stack collector Helm chart</title> | |
| <meta http-equiv="refresh" content="0; url=https://github.com/BetterStackHQ/collector-helm-chart"> | |
| <link rel="canonical" href="https://github.com/BetterStackHQ/collector-helm-chart"> | |
| </head> | |
| <body> | |
| <p>Redirecting to <a href="https://github.com/BetterStackHQ/collector-helm-chart">Better Stack collector Helm chart repository</a>...</p> | |
| </body> | |
| </html> | |
| EOF | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3.0.1 | |
| with: | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4.0.5 |