Skip to content

hardcode deleteme

hardcode deleteme #2

name: hardcode deleteme
on:
workflow_dispatch:
inputs:
target_service:
description: 'Input a service name (e.g., demo-app)'
required: true
target_version:
description: 'Input a version (e.g., v1.0.0)'
required: true
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow in Another Repository
run: |
# Set the required variables
repo_owner="TechnologyEnhancedLearning" # Replace with the repository owner (organization or user)
repo_name="GitPageBlazorWASM-TestGHPage" # Replace with the repository name
event_type="artifact_ready"
artifact_url="https://api.github.com/repos/TechnologyEnhancedLearning/GitPageBlazorWASM/actions/artifacts/2859947943"
# Trigger the workflow in another repository
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PACKAGES_TOKEN }}" \
-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\": \"$artifact_url\"}"