Skip to content

Commit

Permalink
trial: composite (#25)
Browse files Browse the repository at this point in the history
* update action.yml to use composite

* set inputs as env

* use node-version-file to manage the node version easily

* move if and checkout steps to action.yml

* restore `uses:actions/checkout@v4` in test-action.yml

ref: #25 (comment)

* set if on each step
  • Loading branch information
tnyo43 authored Mar 21, 2024
1 parent 3d10fb3 commit 9328215
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.event_name != 'issue_comment' || github.event.issue.pull_request
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: Test Local Action
id: test-action
uses: ./
Expand Down
17 changes: 15 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,18 @@ inputs:
required: false

runs:
using: node20
main: dist/index.js
using: 'composite'
steps:
- uses: actions/checkout@v4
if: github.event_name != 'issue_comment' || github.event.issue.pull_request
- uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
if: github.event_name != 'issue_comment' || github.event.issue.pull_request
- run: 'node ${GITHUB_ACTION_PATH}/dist/index.js'
shell: bash
env:
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_THRESHOLD: ${{ inputs.threshold }}
INPUT_DEBUG: ${{ inputs.debug }}
if: github.event_name != 'issue_comment' || github.event.issue.pull_request

0 comments on commit 9328215

Please sign in to comment.