-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (42 loc) · 1.24 KB
/
update-submodule.yml
File metadata and controls
45 lines (42 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
# yamllint disable rule:truthy
name: Trigger Submodule update
on:
workflow_dispatch:
inputs:
runs-on:
description: "The OS to run the job on"
required: false
default: "ubuntu-22.04"
type: string
version:
type: string
required: false
description: The string to extract semver from.
default: ''
workflow_call:
inputs:
runs-on:
description: "The OS to run the job on"
required: false
default: "ubuntu-22.04"
type: string
version:
type: string
required: false
description: The string to extract semver from.
default: ''
jobs:
trigger-submodule:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Trigger submodule update
run: |
echo "${{ inputs.version }}"
curl -X POST \
-H "Authorization: token ${{ secrets.GH_UPDATE_PACKAGE_OTTO }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/opsmill/infrahub/dispatches \
-d "{\"event_type\":\"trigger-submodule-update\", \"client_payload\": {\"version\": \"${{ inputs.version }}\"}}"