add files
This commit is contained in:
parent
6bc473bdd9
commit
10d6c1480e
31
.gitea/workflows/checkChannelSecurityInput.yaml
Normal file
31
.gitea/workflows/checkChannelSecurityInput.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Check Channel Security Input
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
channel:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
channelInput:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
jobs:
|
||||||
|
UpdateRelease:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Read Tag
|
||||||
|
run: |
|
||||||
|
|
||||||
|
channel="${{ inputs.channel }}"
|
||||||
|
if [ "$channel" = "internal" ]; then
|
||||||
|
echo "Channel is internal"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$channel" != "${{ inputs.channelInput }}" ]; then
|
||||||
|
echo "Channel and channelInput do not match"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Channel and channelInput match"
|
||||||
|
exit 0
|
||||||
|
|
31
.gitea/workflows/checkForTag.yaml
Normal file
31
.gitea/workflows/checkForTag.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Check for Tag
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
repo:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
jobs:
|
||||||
|
UpdateRelease:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Read Tag
|
||||||
|
run: |
|
||||||
|
GITEA_API_URL="https://gitea.greyhound-software.com/api/v1"
|
||||||
|
OWNER="greyhound"
|
||||||
|
API_TOKEN=${{ vars.PAT_TOKEN }}
|
||||||
|
|
||||||
|
tag=$(curl -s -H "Authorization: token $API_TOKEN" \
|
||||||
|
"$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/tags/${{ inputs.tag }}")
|
||||||
|
|
||||||
|
echo "Tag details: $tag"
|
||||||
|
|
||||||
|
if echo "$tag" | jq -e '.name' > /dev/null; then
|
||||||
|
echo "This Tag allready exists"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user