Skip to content

Merge pull request #2 from anantacloud-actions/dependabot/github_acti… #2

Merge pull request #2 from anantacloud-actions/dependabot/github_acti…

Merge pull request #2 from anantacloud-actions/dependabot/github_acti… #2

Workflow file for this run

name: Setup Labels
on:
push:
branches: [main]
jobs:
labels:
runs-on: ubuntu-latest
steps:
- name: Create labels
uses: actions/github-script@v9
with:
script: |
const labels = [
{ name: "bug", color: "d73a4a" },
{ name: "enhancement", color: "a2eeef" },
{ name: "release", color: "5319e7" }
];
for (const label of labels) {
try {
await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: label.name,
color: label.color
});
} catch (e) {
console.log(`Label ${label.name} may already exist`);
}
}