Skip to content

Commit

Permalink
Install quest (#434)
Browse files Browse the repository at this point in the history
* Install quest.

* Correct comment.
  • Loading branch information
davidbritch authored Feb 14, 2024
1 parent 8a00577 commit 8ee3ffe
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/quest-bulk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "bulk quest import"
on:
schedule:
- cron: '0 6 * * *' # UTC time, that's 6pm UTC, 1pm EST.
workflow_dispatch:
inputs:
reason:
description: "The reason for running the bulk import workflow"
required: true
default: "Initial import into Quest (Azure DevOps)"

jobs:
bulk-import:
runs-on: ubuntu-latest
permissions:
issues: write
if: ${{ github.repository_owner == 'dotnet' }}

steps:
- name: "Print manual bulk import run reason"
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "Reason: ${{ github.event.inputs.reason }}"
- name: bulk-sequester
id: bulk-sequester
uses: dotnet/docs-tools/actions/sequester@main
env:
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
ImportOptions__ApiKeys__SequesterPrivateKey: ${{ secrets.SEQUESTER_PRIVATEKEY }}
ImportOptions__ApiKeys__SequesterAppID: ${{ secrets.SEQUESTER_APPID }}
with:
org: ${{ github.repository_owner }}
repo: ${{ github.repository }}
issue: '-1'
63 changes: 63 additions & 0 deletions .github/workflows/quest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "quest import"
on:
workflow_dispatch:
inputs:
reason:
description: "The reason for running the workflow"
required: true
default: "Manual run"
issue:
description: "The issue number to manually test"
required: true

jobs:
import:
if: |
github.event_name == 'workflow_dispatch' ||
github.event.label.name == ':world_map: reQUEST' ||
github.event.label.name == ':pushpin: seQUESTered' ||
contains(github.event.issue.labels.*.name, ':world_map: reQUEST') ||
contains(github.event.issue.labels.*.name, ':pushpin: seQUESTered')
runs-on: ubuntu-latest
permissions:
issues: write

steps:
- name: "Print manual run reason"
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "Reason: ${{ github.event.inputs.reason }}"
echo "Issue number: ${{ github.event.inputs.issue }}"
# This step occurs when ran manually, passing the manual issue number input
- name: manual-sequester
if: ${{ github.event_name == 'workflow_dispatch' }}
id: manual-sequester
uses: dotnet/docs-tools/actions/sequester@main
env:
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
ImportOptions__ApiKeys__SequesterPrivateKey: ${{ secrets.SEQUESTER_PRIVATEKEY }}
ImportOptions__ApiKeys__SequesterAppID: ${{ secrets.SEQUESTER_APPID }}
with:
org: ${{ github.repository_owner }}
repo: ${{ github.repository }}
issue: ${{ github.event.inputs.issue }}

# This step occurs automatically, passing the issue number from the event
- name: auto-sequester
if: ${{ github.event_name != 'workflow_dispatch' }}
id: auto-sequester
uses: dotnet/docs-tools/actions/sequester@main
env:
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
ImportOptions__ApiKeys__OSPOKey: ${{ secrets.OSPO_KEY }}
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
ImportOptions__ApiKeys__SequesterPrivateKey: ${{ secrets.SEQUESTER_PRIVATEKEY }}
ImportOptions__ApiKeys__SequesterAppID: ${{ secrets.SEQUESTER_APPID }}
with:
org: ${{ github.repository_owner }}
repo: ${{ github.repository }}
issue: ${{ github.event.issue.number }}

9 changes: 9 additions & 0 deletions quest-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"AzureDevOps": {
"Org": "msft-skilling",
"Project": "Content",
"AreaPath": "Production\\Digital and App Innovation\\DotNet and more\\MAUI"
},
"ImportTriggerLabel": ":world_map: reQUEST",
"ImportedLabel": ":pushpin: seQUESTered"
}

0 comments on commit 8ee3ffe

Please sign in to comment.