-
-
Notifications
You must be signed in to change notification settings - Fork 35
144 lines (125 loc) · 4.46 KB
/
webservices-workflow-dispatch.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: webservices-workflow-dispatch
run-name: >-
${{ inputs.task }}: conda-forge/${{ inputs.repo }}#${{ inputs.pr_number }} [container=${{ inputs.container_tag }}, requested_version=${{ inputs.requested_version }}, uuid=${{ inputs.uuid }}]
on:
workflow_dispatch:
inputs:
task:
description: 'the task to perform'
required: true
type: string
repo:
description: 'the repository to run on'
required: true
type: string
pr_number:
description: 'the pull request number'
required: true
type: string
container_tag:
description: 'the container tag to use'
required: true
type: string
requested_version:
description: 'the requested version for a version update'
required: false
type: string
default: 'null'
uuid:
description: 'a unique identifier for this run'
required: true
type: string
sha:
description: 'the sha of the commit to run on'
required: false
type: string
default: 'null'
env:
PY_COLORS: 1
defaults:
run:
shell: bash -leo pipefail {0}
permissions: {}
jobs:
run-task:
name: run-task
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: setup conda
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: install code
run: |
pip install --no-deps --no-build-isolation -e .
- name: run task
run: |
git config --global user.name "conda-forge-webservices[bot]"
git config --global user.email "91080706+conda-forge-webservices[bot]@users.noreply.github.com"
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${{ inputs.container_tag }}"
conda-forge-webservices-run-task \
--task=${{ inputs.task }} \
--repo=${{ inputs.repo }} \
--pr-number=${{ inputs.pr_number }} \
--task-data-dir=${{ github.workspace }}/task-data \
--requested-version=${{ inputs.requested_version }} \
--sha=${{ inputs.sha }}
- name: upload task data
id: upload-task-data
uses: actions/upload-artifact@v4
with:
name: task-data-${{ inputs.task }}-${{ inputs.repo }}-${{ inputs.pr_number }}-${{ github.run_id }}-${{ github.run_number }}
path: ${{ github.workspace }}/task-data
retention-days: 2
include-hidden-files: true
finalize-task:
name: finalize-task
runs-on: ubuntu-latest
needs:
- run-task
steps:
- name: checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: setup conda
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: install code
run: |
pip install --no-deps --no-build-isolation -e .
- name: download task data
uses: actions/download-artifact@v4
with:
name: task-data-${{ inputs.task }}-${{ inputs.repo }}-${{ inputs.pr_number }}-${{ github.run_id }}-${{ github.run_number }}
path: ${{ github.workspace }}/task-data
- name: finalize task
run: |
git config --global user.name "conda-forge-webservices[bot]"
git config --global user.email "91080706+conda-forge-webservices[bot]@users.noreply.github.com"
export CF_FEEDSTOCK_OPS_CONTAINER_NAME=condaforge/webservices-dispatch-action
export CF_FEEDSTOCK_OPS_CONTAINER_TAG="${{ inputs.container_tag }}"
conda-forge-webservices-finalize-task \
--task-data-dir=${{ github.workspace }}/task-data
env:
GH_TOKEN: ${{ secrets.CF_ADMIN_GITHUB_TOKEN }}