mirror of
https://github.com/ditkrg/project-version-check.git
synced 2026-01-23 06:16:41 +00:00
Add label
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
73217f0541
commit
9ef3dbc165
6
.github/workflows/main.yaml
vendored
6
.github/workflows/main.yaml
vendored
@ -1,6 +1,8 @@
|
|||||||
name: Test Action
|
name: Test Action
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
hello-world-job:
|
hello-world-job:
|
||||||
@ -23,6 +25,6 @@ jobs:
|
|||||||
id: hello
|
id: hello
|
||||||
with:
|
with:
|
||||||
who-to-greet: "John"
|
who-to-greet: "John"
|
||||||
|
label: ${{ github.event.label.name }}
|
||||||
- name: Get the output time
|
- name: Get the output time
|
||||||
run: echo "The time was ${{ steps.hello.outputs.time }}"
|
run: echo "The time was ${{ steps.hello.outputs.time }}"
|
||||||
|
|||||||
@ -5,6 +5,9 @@ inputs:
|
|||||||
description: "Who to greet"
|
description: "Who to greet"
|
||||||
required: true
|
required: true
|
||||||
default: "World"
|
default: "World"
|
||||||
|
label:
|
||||||
|
description: "Optional label"
|
||||||
|
required: false
|
||||||
outputs:
|
outputs:
|
||||||
time: # id of output
|
time: # id of output
|
||||||
description: "The time we greeted you"
|
description: "The time we greeted you"
|
||||||
|
|||||||
2
index.js
2
index.js
@ -4,6 +4,8 @@ const github = require('@actions/github');
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const nameToGreet = core.getInput('who-to-greet');
|
const nameToGreet = core.getInput('who-to-greet');
|
||||||
|
const label = core.getInput('label');
|
||||||
|
console.log(`Lable: ${label}`)
|
||||||
console.log(`Hello ${nameToGreet}!`);
|
console.log(`Hello ${nameToGreet}!`);
|
||||||
const time = (new Date()).toTimeString();
|
const time = (new Date()).toTimeString();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user