Skip to content

Commit

Permalink
Add script for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
venetrius committed Oct 10, 2024
1 parent 366a64f commit 379f678
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/src/set-version-labels.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = async function() {
console.log("Hello World");
}
4 changes: 4 additions & 0 deletions version-label-automation-manual/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: Label Issues
runs:
using: 'node16'
main: 'index.js'
3 changes: 3 additions & 0 deletions version-label-automation-manual/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const common = require('../common/src/set-version-labels.js');

common();
19 changes: 19 additions & 0 deletions version-label-automation/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Label issues
on:
issues:
types:
- closed
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Run test
if: github.ref == 'refs/heads/Version-Labels-Automation'
run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: "Hello World"

0 comments on commit 379f678

Please sign in to comment.