Files
importer-issue-ops/.github/workflows/template-deploy.yml
Collin McNeese fbe4dc53f7 template-deploy DRY-up from initial
Signed-off-by: Collin McNeese <collinmcneese@github.com>
2022-11-23 10:47:29 -06:00

41 lines
996 B
YAML

# This workflow contains steps which execute when template is converted to a repository
name: template-deploy
on:
create:
ref: main
ref_type: branch
permissions:
contents: write
issues: write
jobs:
# Add issue labels expected by the repository
add-repo-labels:
if: ${{ !github.event.repository.is_template }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
let labels = [
'jenkins',
'azure-devops',
'circle-ci',
'gitlab',
'travis-ci',
'actions-importer-running'
];
labels.forEach( (label) => {
github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: label,
color: '00FFFF',
description: 'Label used by Issue Ops workflow.'
});
});