asd
This commit is contained in:
37
.gitea/workflows/getReleaseChannel.yaml
Normal file
37
.gitea/workflows/getReleaseChannel.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Get Release Channel
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
tag:
|
||||
required: true
|
||||
type: string
|
||||
outputs:
|
||||
buildChannel:
|
||||
description: "The current Release Build channel"
|
||||
value: ${{ jobs.read.outputs.buildChannel }}
|
||||
|
||||
jobs:
|
||||
read:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
buildChannel: ${{ steps.readRelease.outputs.buildChannel }}
|
||||
steps:
|
||||
- id: readRelease
|
||||
run: |
|
||||
GITEA_API_URL="https://gitea.greyhound-software.com/api/v1"
|
||||
OWNER="greyhound"
|
||||
API_TOKEN=${{ vars.PAT_TOKEN }}
|
||||
|
||||
### RELEASE ###
|
||||
# Read Release and Extract the ID
|
||||
tag=$(echo "${{ inputs.tag }}" | sed 's/\//%2F/g')
|
||||
|
||||
release=$(curl -s -H "Authorization: token $API_TOKEN" \
|
||||
"$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/tags/$tag")
|
||||
|
||||
echo "Release Read $release"
|
||||
|
||||
release_body=$(echo $release | jq -r '.body')
|
||||
echo "Release Body $release_body"
|
||||
|
||||
echo "buildChannel=$buildChannel" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user