Skip to content

Release tagged linux image #5

Release tagged linux image

Release tagged linux image #5

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 }}