1
1
name : " bulk quest import"
2
2
on :
3
+ schedule :
4
+ - cron : ' 0 10 * * *' # UTC time, that's 5:00 am EST, 2:00 am PST.
5
+ - cron : ' 0 9 6 * *' # This is the morning of the 6th.
6
+
3
7
workflow_dispatch :
4
8
inputs :
5
9
reason :
6
10
description : " The reason for running the bulk import workflow"
7
11
required : true
8
12
default : " Initial import into Quest (Azure DevOps)"
13
+ duration :
14
+ description : " The number of days to import issues for. Defaults to 5 days."
15
+ required : false
16
+ default : " 5"
9
17
10
18
jobs :
11
19
bulk-import :
@@ -20,15 +28,25 @@ jobs:
20
28
run : |
21
29
echo "Reason: ${{ github.event.inputs.reason }}"
22
30
31
+ - name : Azure OpenID Connect
32
+ id : azure-oidc-auth
33
+ uses : dotnet/docs-tools/.github/actions/oidc-auth-flow@main
34
+ with :
35
+ client-id : ${{ secrets.CLIENT_ID }}
36
+ tenant-id : ${{ secrets.TENANT_ID }}
37
+ audience : ${{ secrets.OSMP_API_AUDIENCE }}
38
+
23
39
- name : bulk-sequester
24
- if : ${{ github.event_name == 'workflow_dispatch' }}
25
40
id : bulk-sequester
26
41
uses : dotnet/docs-tools/actions/sequester@main
27
42
env :
28
43
ImportOptions__ApiKeys__GitHubToken : ${{ secrets.GITHUB_TOKEN }}
29
- ImportOptions__ApiKeys__OSPOKey : ${{ secrets.OSPO_KEY }}
30
44
ImportOptions__ApiKeys__QuestKey : ${{ secrets.QUEST_KEY }}
45
+ ImportOptions__ApiKeys__AzureAccessToken : ${{ steps.azure-oidc-auth.outputs.access-token }}
46
+ ImportOptions__ApiKeys__SequesterPrivateKey : ${{ secrets.SEQUESTER_PRIVATEKEY }}
47
+ ImportOptions__ApiKeys__SequesterAppID : ${{ secrets.SEQUESTER_APPID }}
31
48
with :
32
49
org : ${{ github.repository_owner }}
33
50
repo : ${{ github.repository }}
34
51
issue : ' -1'
52
+ duration : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.duration || github.event.schedule == '0 9 6 * *' && -1 || 5 }}
0 commit comments