Skip to content

Commit 0ee6c13

Browse files
authored
Add monthly mode (#7024)
Add the monthly mode, and pick up other recent changes.
1 parent 229526e commit 0ee6c13

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/quest-bulk.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
name: "bulk quest import"
22
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+
37
workflow_dispatch:
48
inputs:
59
reason:
610
description: "The reason for running the bulk import workflow"
711
required: true
812
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"
917

1018
jobs:
1119
bulk-import:
@@ -20,15 +28,25 @@ jobs:
2028
run: |
2129
echo "Reason: ${{ github.event.inputs.reason }}"
2230
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+
2339
- name: bulk-sequester
24-
if: ${{ github.event_name == 'workflow_dispatch' }}
2540
id: bulk-sequester
2641
uses: dotnet/docs-tools/actions/sequester@main
2742
env:
2843
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
29-
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
3044
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 }}
3148
with:
3249
org: ${{ github.repository_owner }}
3350
repo: ${{ github.repository }}
3451
issue: '-1'
52+
duration: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.duration || github.event.schedule == '0 9 6 * *' && -1 || 5 }}

0 commit comments

Comments
 (0)