chore(deps): bump softprops/action-gh-release from 2 to 3 #75
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*.*.*'] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/uneeq-oss/prometheus-mixin-ci:latest | |
| options: --user root # HACK GHA lack of repo mounting -> perm issues | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build/Render jsonnet | |
| run: make build | |
| - name: Archive manifests for testing and publishing | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: manifests | |
| path: manifests/ | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download rendered manifests | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: manifests | |
| path: manifests/ | |
| - name: Test | |
| uses: docker://ghcr.io/uneeq-oss/prometheus-mixin-ci:latest | |
| with: | |
| entrypoint: make | |
| args: test SKIP_DOCKER=true | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [build, test] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Extract tag | |
| id: extract_tag | |
| run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} | |
| - name: Extract repository | |
| id: extract_repo | |
| run: echo ::set-output name=REPO::${GITHUB_REPOSITORY##*/} | |
| - name: Download rendered manifests | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: manifests | |
| path: manifests/ | |
| - name: Package files for upload | |
| run: | | |
| tar -cvzf \ | |
| ${{ steps.extract_repo.outputs.REPO }}-rendered-${{ steps.extract_tag.outputs.TAG }}.tar.gz \ | |
| manifests/ \ | |
| LICENSE \ | |
| podmonitor.yaml | |
| - name: Generate changelog | |
| id: generate_changelog | |
| uses: metcalfc/changelog-generator@v4.6.2 | |
| with: | |
| myToken: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Release | |
| uses: softprops/action-gh-release@v3 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body: | | |
| ${{ steps.generate_changelog.outputs.changelog }} | |
| files: ${{ steps.extract_repo.outputs.REPO }}-rendered-${{ steps.extract_tag.outputs.TAG }}.tar.gz |