|
| 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 | + |
0 commit comments