Labeler: Promotion #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow template imported and updated from: | |
# https://github.com/dotnet/issue-labeler/wiki/Onboarding | |
# | |
# See labeler.md for more information | |
# | |
# Promote a model from staging to 'ACTIVE', backing up the currently 'ACTIVE' model | |
name: "Labeler: Promotion" | |
on: | |
# Dispatched via the Actions UI, promotes the staged models from | |
# a staged slot into the prediction environment | |
workflow_dispatch: | |
inputs: | |
issues: | |
description: "Issues: Promote Model" | |
type: boolean | |
required: true | |
pulls: | |
description: "Pulls: Promote Model" | |
type: boolean | |
required: true | |
staged_key: | |
description: "The cache key suffix to use for promoting a staged model to 'ACTIVE'. Defaults to 'staged'." | |
required: true | |
default: "staged" | |
backup_key: | |
description: "The cache key suffix to use for backing up the currently active model. Defaults to 'backup'." | |
default: "backup" | |
permissions: | |
actions: write | |
jobs: | |
promote-issues: | |
if: ${{ inputs.issues }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Promote Model for Issues" | |
uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 | |
with: | |
type: "issues" | |
staged_key: ${{ inputs.staged_key }} | |
backup_key: ${{ inputs.backup_key }} | |
promote-pulls: | |
if: ${{ inputs.pulls }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Promote Model for Pull Requests" | |
uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0 | |
with: | |
type: "pulls" | |
staged_key: ${{ inputs.staged_key }} | |
backup_key: ${{ inputs.backup_key }} |