Skip to content

Commit 92528a2

Browse files
authored
Run quest nightly (#8896)
Install the quest importer in this repo. Labels matching the config have been created. If we want to change the labels, we need to update both the labels and the config file.
1 parent 4ab4f83 commit 92528a2

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed

.github/workflows/quest-bulk.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "bulk quest import"
2+
on:
3+
schedule:
4+
- cron: '0 10 * * *' # UTC time, that's 5:00 am EST, 2:00 am PST.
5+
workflow_dispatch:
6+
inputs:
7+
reason:
8+
description: "The reason for running the bulk import workflow"
9+
required: true
10+
default: "Initial import into Quest (Azure DevOps)"
11+
12+
jobs:
13+
bulk-import:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
issues: write
17+
18+
steps:
19+
- name: "Print manual bulk import run reason"
20+
if: ${{ github.event_name == 'workflow_dispatch' }}
21+
run: |
22+
echo "Reason: ${{ github.event.inputs.reason }}"
23+
24+
- name: bulk-sequester
25+
id: bulk-sequester
26+
uses: dotnet/docs-tools/actions/sequester@main
27+
env:
28+
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
29+
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
30+
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
31+
with:
32+
org: ${{ github.repository_owner }}
33+
repo: ${{ github.repository }}
34+
issue: '-1'

.github/workflows/quest.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "quest import"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
reason:
6+
description: "The reason for running the workflow"
7+
required: true
8+
default: "Manual run"
9+
issue:
10+
description: "The issue number to manually test"
11+
required: true
12+
13+
jobs:
14+
import:
15+
if: |
16+
github.event_name == 'workflow_dispatch' ||
17+
github.event.label.name == ':world_map: reQUEST' ||
18+
github.event.label.name == ':pushpin: seQUESTered' ||
19+
contains(github.event.issue.labels.*.name, ':world_map: reQUEST') ||
20+
contains(github.event.issue.labels.*.name, ':pushpin: seQUESTered')
21+
runs-on: ubuntu-latest
22+
permissions:
23+
issues: write
24+
25+
steps:
26+
- name: "Print manual run reason"
27+
if: ${{ github.event_name == 'workflow_dispatch' }}
28+
run: |
29+
echo "Reason: ${{ github.event.inputs.reason }}"
30+
echo "Issue number: ${{ github.event.inputs.issue }}"
31+
32+
# This step occurs when ran manually, passing the manual issue number input
33+
- name: manual-sequester
34+
if: ${{ github.event_name == 'workflow_dispatch' }}
35+
id: manual-sequester
36+
uses: dotnet/docs-tools/actions/sequester@main
37+
env:
38+
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
39+
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
40+
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
41+
with:
42+
org: ${{ github.repository_owner }}
43+
repo: ${{ github.repository }}
44+
issue: ${{ github.event.inputs.issue }}
45+
46+
# This step occurs automatically, passing the issue number from the event
47+
- name: auto-sequester
48+
if: ${{ github.event_name != 'workflow_dispatch' }}
49+
id: auto-sequester
50+
uses: dotnet/docs-tools/actions/sequester@main
51+
env:
52+
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
53+
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
54+
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
55+
with:
56+
org: ${{ github.repository_owner }}
57+
repo: ${{ github.repository }}
58+
issue: ${{ github.event.issue.number }}
59+

quest-config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"AzureDevOps": {
3+
"Org": "msft-skilling",
4+
"Project": "Content",
5+
"AreaPath": "Production\\Digital and App Innovation\\DotNet and more\\dotnet"
6+
},
7+
"ImportTriggerLabel": ":world_map: reQUEST",
8+
"ImportedLabel": ":pushpin: seQUESTered"
9+
}

0 commit comments

Comments
 (0)