mirror of
https://github.com/ditkrg/project-version-check.git
synced 2026-01-22 22:06:42 +00:00
Code cleanup
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
34a9746f3d
commit
283f0c95ff
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@ -24,10 +24,8 @@ jobs:
|
||||
uses: ./
|
||||
id: hello
|
||||
with:
|
||||
who-to-greet: "John"
|
||||
label: ${{ github.event.label.name }}
|
||||
|
||||
- name: Get the output time
|
||||
run: |
|
||||
echo "The time was ${{ steps.hello.outputs.time }}"
|
||||
echo The label was ${{ steps.hello.outputs.label }}
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
name: "Hello World"
|
||||
description: "Greet someone and record the time"
|
||||
inputs:
|
||||
who-to-greet: # id of input
|
||||
description: "Who to greet"
|
||||
required: true
|
||||
default: "World"
|
||||
|
||||
label:
|
||||
description: "Optional label"
|
||||
required: false
|
||||
|
||||
4
index.js
4
index.js
@ -3,14 +3,10 @@ const github = require('@actions/github');
|
||||
|
||||
|
||||
try {
|
||||
const nameToGreet = core.getInput('who-to-greet');
|
||||
const label = core.getInput('label');
|
||||
console.log(`Label: ${label}`)
|
||||
console.log(`Hello ${nameToGreet}!`);
|
||||
const time = (new Date()).toTimeString();
|
||||
|
||||
core.setOutput("label", label);
|
||||
core.setOutput("time", time);
|
||||
|
||||
const payload = JSON.stringify(github.context.payload, undefined, 2)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user