From 9b920c60d8976b6f10f3bdb82b67782397469533 Mon Sep 17 00:00:00 2001 From: ciatph Date: Fri, 13 Sep 2024 15:18:05 +0800 Subject: [PATCH 1/3] wip: testing dispatch --- .github/workflows/manual.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..e8cb908 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,22 @@ +name: Manual Trigger Workflow + +# configure manual trigger +on: + workflow_dispatch: + +jobs: + lint-app: + name: Lint App + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + - name: Use NodeJS v16.14.2 + uses: actions/setup-node@v3 + with: + node-version: 16.14.2 + - name: Install Dependencies and lint + run: | + cd app + npm install + npm run lint From e1ff587e8f09accb589bfc9b0994a2f773d08205 Mon Sep 17 00:00:00 2001 From: ciatph Date: Fri, 13 Sep 2024 15:20:59 +0800 Subject: [PATCH 2/3] wip: testing input --- .github/workflows/manual.yml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index e8cb908..6f836e3 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -1,22 +1,26 @@ -name: Manual Trigger Workflow - -# configure manual trigger +name: Manual Trigger Workflow with loglevel & tags +#get log & tags information on: workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'information' + type: choice + options: + - information + - debug + - warning + - critical + tags: + description: 'Purpose of Run This Workflow?' + required: true + type: string jobs: - lint-app: - name: Lint App + print-tag: runs-on: ubuntu-latest steps: - - name: Checkout the repository - uses: actions/checkout@v3 - - name: Use NodeJS v16.14.2 - uses: actions/setup-node@v3 - with: - node-version: 16.14.2 - - name: Install Dependencies and lint - run: | - cd app - npm install - npm run lint + - name: Print the purpose of run + run: echo ${{ inputs.tags }} purpose \ No newline at end of file From 4a16db8382bae08492a84820a91112487f7194d8 Mon Sep 17 00:00:00 2001 From: ciatph Date: Fri, 13 Sep 2024 15:22:21 +0800 Subject: [PATCH 3/3] wip: define branches to run dispatch --- .github/workflows/manual.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 6f836e3..e5396b5 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -2,6 +2,9 @@ name: Manual Trigger Workflow with loglevel & tags #get log & tags information on: workflow_dispatch: + branches: + - wip/dispatch + - dev inputs: logLevel: description: 'Log level'