0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-12 14:10:44 -05:00

Updates New Trigger Workflow

This commit is contained in:
Refringe 2024-11-22 20:22:45 -05:00 committed by Refringe
parent a0d37fb35d
commit be54fe8fd1
2 changed files with 22 additions and 35 deletions

View File

@ -1,35 +0,0 @@
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 "noreply@sp-tarkov.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

22
.github/workflows/build-trigger.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Trigger Main Build Pipeline
on:
push:
tags:
- "*"
jobs:
trigger-main-build:
runs-on: ubuntu-latest
steps:
- name: Trigger Build Workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.BUILD_REPO_ACCESS_TOKEN }}
repository: sp-tarkov/build
event-type: build-trigger
client-payload: |
{
"repository": "${{ github.repository }}",
"tag": "${{ github.ref_name }}"
}