Skip to content

update: Tue Nov 5 01:58:45 AM UTC 2024 - Updated package.json #2

update: Tue Nov 5 01:58:45 AM UTC 2024 - Updated package.json

update: Tue Nov 5 01:58:45 AM UTC 2024 - Updated package.json #2

Workflow file for this run

name: Trigger Build Workflow
on:
push:
branches: ["main"]
workflow_dispatch:
inputs:
target_service:
description: 'hackingandcoffee-site'
required: true
target_version:
description: 'v0.1.0'
required: true
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow in Main Repository
run: |
# Set the required variables
repo_owner="Hacking-and-Coffee"
repo_name="hackingandcoffee-site"
event_type="trigger-workflow"
service=${{ github.event.inputs.target_service }}"
version="${{ github.event.inputs.target_version }}"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"service\": \"$service\", \"version\": \"$version\", \"unit\": false, \"integration\": true}}"