-
Notifications
You must be signed in to change notification settings - Fork 283
53 lines (48 loc) · 1.96 KB
/
manual-plot.yml
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
46
47
48
49
50
51
52
53
name: Manual Plot
on:
workflow_dispatch:
inputs:
upstream_branch:
description: 'chia pos branch name to use'
required: true
default: 'main'
instance_name_tag:
description: 'name tag to apply to new instance'
required: true
default: 'chia-test-orphan'
commit_sha:
description: 'commit sha to pull other than head'
required: false
count:
description: 'How many instances should plot?'
required: true
default: '1'
k_size:
description: 'The K size to plot'
required: true
default: '27'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}--${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true
jobs:
Plot:
name: Call Plotter
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Test for secrets access
id: check_secrets
shell: bash
run: |
unset HAS_SECRET
if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi
echo "HAS_SECRET=${HAS_SECRET}" >>$GITHUB_OUTPUT
env:
SECRET: "${{ secrets.TEST_WEBHOOK_SECRET }}"
#${{ secrets.REPO_ADMIN }}
- name: Plot
run: |
curl -XPOST -H "Authorization: token ${{ secrets.WEBHOOK_CREDENTIAL }}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/Chia-Network/chia-plotter/actions/workflows/chia-plotter.yml/dispatches --data '{"ref": "main", "inputs": { "upstream_branch": "${{ github.event.inputs.upstream_branch }}", "instance_name_tag": "${{ github.event.inputs.instance_name_tag }}", "commit_sha": "${{ github.event.inputs.commit_sha}}", "ksize": "${{ github.event.inputs.k_size }}", "count": "${{ github.event.inputs.count }}" } }'