Merge pull request #3 from collinmcneese/cm/wf-add

adds workflow for on-deploy steps from template
This commit is contained in:
Ethan Dennis
2022-11-23 11:59:57 -08:00
committed by GitHub
2 changed files with 42 additions and 2 deletions

40
.github/workflows/template-deploy.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
# 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.'
});
});

View File

@@ -15,8 +15,8 @@ The GitHub Actions Importer IssueOps repository demonstrates the functionality n
Complete the following steps:
1. Create a new repository using this repository as the template by clicking [here](https://github.com/actions/importer-issue-ops/generate).
2. Create the following labels in this new repository: `jenkins`, `azure-devops`, `circle-ci`, `gitlab`, `travis-ci`, and `actions-importer-running`.
3. Add the repository secrets described below that are relevant to the CI/CD providers being migrated:
2. Create the following labels in this new repository, if they are not already present: `jenkins`, `azure-devops`, `circle-ci`, `gitlab`, `travis-ci`, and `actions-importer-running`.
3. Add the repository secrets described below that are relevant to the CI/CD providers being migrated.
### All CI/CD providers