Release tagged linux image #5
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: Release tagged linux image | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version_number: | |
| required: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build-push-linux: | |
| uses: ./.github/workflows/build-push-linux.yaml | |
| secrets: inherit | |
| with: | |
| version_number: ${{ github.event.inputs.version_number }} | |
| release: | |
| needs: [build-push-linux] | |
| runs-on: [self-hosted, linux] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Create body.md | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh api --method POST -H "Accept: application/vnd.github+json" \ | |
| "/repos/${GITHUB_REPOSITORY}/releases/generate-notes" \ | |
| -f tag_name="${{ github.event.inputs.version_number }}" \ | |
| --jq ".body" \ | |
| > body.md | |
| - name: Create new release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| bodyFile: body.md | |
| tag: ${{ github.event.inputs.version_number }} | |
| token: ${{ secrets.GITHUB_TOKEN }} |