Skip to content

Commit

Permalink
feat: add Github Actions workflow to trigger VM build
Browse files Browse the repository at this point in the history
  • Loading branch information
alismx committed Feb 3, 2025
1 parent d1213cc commit f069005
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/triggerBuildVM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build dibbs-vm
run-name: "Build dibbs-vm: ${{ inputs.dibbs_service }}:${{ inputs.dibbs_version }} by @${{ github.actor }}"

on:
workflow_dispatch:
inputs:
dibbs_service:
type: choice
description: 'The service to build'
required: true
options:
- dibbs-ecr-viewer
dibbs_version:
type: string
description: 'The version of dibbs-ecr-viewer to build'
required: true

jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow in Another Repository
run: |
repo_owner="CDCgov"
repo_name="dibbs-vm"
event_type="trigger-workflow"
service="${{ github.event.inputs.dibbs_service }}"
version="${{ github.event.inputs.dibbs_version }}"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DIBBS_VM_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}}"

0 comments on commit f069005

Please sign in to comment.