mirror of
https://github.com/sp-tarkov/build.git
synced 2025-02-13 01:50:46 -05:00
Enables Workflow Dispatch
You can now trigger builds from the GH UI
This commit is contained in:
parent
3e2b955d54
commit
159c260bbb
25
.github/workflows/build.yaml
vendored
25
.github/workflows/build.yaml
vendored
@ -5,6 +5,12 @@ on:
|
|||||||
- cron: "0 17 * * *"
|
- cron: "0 17 * * *"
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [build-trigger]
|
types: [build-trigger]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
buildTag:
|
||||||
|
description: "The tag to build on"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
@ -33,6 +39,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
EVENT_NAME: ${{ github.event_name }}
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
CLIENT_PAYLOAD_TAG: ${{ github.event.client_payload.tag }}
|
CLIENT_PAYLOAD_TAG: ${{ github.event.client_payload.tag }}
|
||||||
|
WORKFLOW_INPUT_TAG: ${{ github.event.inputs.buildTag }}
|
||||||
run: |
|
run: |
|
||||||
echo "Determining build context..."
|
echo "Determining build context..."
|
||||||
if [[ "$EVENT_NAME" == "schedule" ]]; then
|
if [[ "$EVENT_NAME" == "schedule" ]]; then
|
||||||
@ -42,24 +49,22 @@ jobs:
|
|||||||
echo "branch_launcher=3.10.0-DEV" >> $GITHUB_OUTPUT
|
echo "branch_launcher=3.10.0-DEV" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "is_nightly=false" >> $GITHUB_OUTPUT
|
echo "is_nightly=false" >> $GITHUB_OUTPUT
|
||||||
if [[ -z "$CLIENT_PAYLOAD_TAG" ]]; then
|
# Determine the tag based on the event type
|
||||||
echo "No tag provided in event payload."
|
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
|
||||||
|
TAG_NAME="$WORKFLOW_INPUT_TAG"
|
||||||
|
elif [[ "$EVENT_NAME" == "repository_dispatch" ]]; then
|
||||||
|
TAG_NAME="$CLIENT_PAYLOAD_TAG"
|
||||||
|
else
|
||||||
|
echo "Unsupported event: $EVENT_NAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "target_tag=$CLIENT_PAYLOAD_TAG" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Determine Target Tag
|
|
||||||
id: determine-target-tag
|
|
||||||
if: steps.determine-context.outputs.is_nightly == 'false'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
TAG_NAME="${{ github.event.client_payload.tag }}"
|
|
||||||
if [[ -z "$TAG_NAME" ]]; then
|
if [[ -z "$TAG_NAME" ]]; then
|
||||||
echo "No tag provided in event payload."
|
echo "No tag provided in event payload."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "target_tag=$TAG_NAME" >> $GITHUB_OUTPUT
|
echo "target_tag=$TAG_NAME" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Determine Build Type
|
- name: Determine Build Type
|
||||||
id: determine-build-type
|
id: determine-build-type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user