Added a prepare job to documentation GH workflow
This commit is contained in:
25
.github/workflows/documentation.yml
vendored
25
.github/workflows/documentation.yml
vendored
@@ -15,6 +15,31 @@ permissions:
|
|||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
prepare:
|
||||||
|
name: Prepare version strings
|
||||||
|
if: github.repository == 'openra/openra'
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Prepare environment variables
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "push" ]; then
|
||||||
|
if [ "${{ github.ref_type }}" = "tag" ]; then
|
||||||
|
VERSION_TYPE=`echo "${GITHUB_REF#refs/tags/}" | cut -d"-" -f1`
|
||||||
|
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
|
echo "VERSION_TYPE=$VERSION_TYPE" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "GIT_TAG=bleed" >> $GITHUB_ENV
|
||||||
|
echo "VERSION_TYPE=bleed" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
VERSION_TYPE=`echo "${{ github.event.inputs.tag }}" | cut -d"-" -f1`
|
||||||
|
echo "GIT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
|
||||||
|
echo "VERSION_TYPE=$VERSION_TYPE" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
outputs:
|
||||||
|
git_tag: ${{ env.GIT_TAG }}
|
||||||
|
version_type: ${{ env.VERSION_TYPE }}
|
||||||
|
|
||||||
wiki:
|
wiki:
|
||||||
name: Update Wiki
|
name: Update Wiki
|
||||||
if: github.repository == 'openra/openra'
|
if: github.repository == 'openra/openra'
|
||||||
|
|||||||
Reference in New Issue
Block a user