♻️ (action.yml): remove condição de comando e simplifica etapas do workflow do GitHub Actions
This commit is contained in:
12
action.yml
12
action.yml
@@ -30,10 +30,7 @@ inputs:
|
|||||||
description: 'Timeout in ms'
|
description: 'Timeout in ms'
|
||||||
required: false
|
required: false
|
||||||
default: '3600000'
|
default: '3600000'
|
||||||
command:
|
|
||||||
description: 'Command to run (deploy, hello)'
|
|
||||||
required: false
|
|
||||||
default: 'deploy'
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@@ -43,19 +40,12 @@ runs:
|
|||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: inputs.command == 'deploy'
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ${{ github.action_path }}
|
cd ${{ github.action_path }}
|
||||||
npm install --no-save --omit=dev
|
npm install --no-save --omit=dev
|
||||||
|
|
||||||
- name: Hello World
|
|
||||||
if: inputs.command == 'hello'
|
|
||||||
shell: bash
|
|
||||||
run: echo "Hello World"
|
|
||||||
|
|
||||||
- name: Run deployment script
|
- name: Run deployment script
|
||||||
if: inputs.command == 'deploy'
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: node ${{ github.action_path }}/main.js
|
run: node ${{ github.action_path }}/main.js
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user