mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 08:50:43 -05:00
Modules Build Trigger (!103)
This is a workflow that triggers the build workflow of the Build project whenever this project has a tag pushed to it. Reviewed-on: SPT-AKI/Modules#103 Co-authored-by: Refringe <me@refringe.com> Co-committed-by: Refringe <me@refringe.com>
This commit is contained in:
parent
39483b13c3
commit
979fb693c5
35
.gitea/workflows/build-trigger.yaml
Normal file
35
.gitea/workflows/build-trigger.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Trigger Main Build Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
trigger-main-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Setup Git Config
|
||||||
|
run: |
|
||||||
|
git config --global user.email "triggerbot@example.com"
|
||||||
|
git config --global user.name "TriggerBot"
|
||||||
|
|
||||||
|
- name: Clone Build Repository
|
||||||
|
run: |
|
||||||
|
rm -rf ../Build
|
||||||
|
git clone https://${{ secrets.BUILD_USERNAME }}:${{ secrets.BUILD_ACCESS_TOKEN }}@dev.sp-tarkov.com/SPT-AKI/Build.git ../Build
|
||||||
|
|
||||||
|
- name: Trigger Branch
|
||||||
|
working-directory: ../Build
|
||||||
|
run: git checkout -b trigger || git checkout trigger
|
||||||
|
|
||||||
|
- name: Create Trigger File
|
||||||
|
working-directory: ../Build
|
||||||
|
run: |
|
||||||
|
echo "${GITHUB_REF_NAME}" > .gitea/trigger
|
||||||
|
git add .gitea/trigger
|
||||||
|
git commit -m "Modules triggered build with tag '${GITHUB_REF_NAME}'"
|
||||||
|
|
||||||
|
- name: Force Push
|
||||||
|
working-directory: ../Build
|
||||||
|
run: git push --force origin trigger
|
Loading…
x
Reference in New Issue
Block a user