release workflow to gather release facts
This commit is contained in:
28
.gitea/workflows/gitea-gather-release-facts.yaml
Normal file
28
.gitea/workflows/gitea-gather-release-facts.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Gitea Gather Release Facts
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
sha:
|
||||
description: "Git SHA of the release"
|
||||
value: ${{ jobs.facts.outputs.sha }}
|
||||
tag_name:
|
||||
description: "Release tag name"
|
||||
value: ${{ jobs.facts.outputs.tag_name }}
|
||||
environment:
|
||||
description: "Deployment environment"
|
||||
value: ${{ jobs.facts.outputs.environment }}
|
||||
jobs:
|
||||
facts:
|
||||
name: Gather Facts
|
||||
steps:
|
||||
- name: Set outputs
|
||||
id: facts
|
||||
run: |
|
||||
echo "sha=${{ gitea.event.release.target_commitish }}" >> $GITHUB_OUTPUT
|
||||
echo "tag_name=${{ gitea.event.release.tag_name }}" >> $GITHUB_OUTPUT
|
||||
echo "environment=${{ gitea.event.release.prerelease && 'staging' || 'live' }}" >> $GITHUB_OUTPUT
|
||||
outputs:
|
||||
sha: ${{ steps.facts.outputs.sha }}
|
||||
tag_name: ${{ steps.facts.outputs.tag_name }}
|
||||
environment: ${{ steps.facts.outputs.environment }}
|
||||
Reference in New Issue
Block a user