Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trial: composite #25

Merged
merged 6 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Owner Author

@tnyo43 tnyo43 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment


getInput is not working ... 🤔

Run node ${GITHUB_ACTION_PATH}/dist/index.js
node ${GITHUB_ACTION_PATH}/dist/index.js
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Error: Input required and not supplied: github_token
Error: Process completed with exit code 1.
https://github.com/tnyo43/recommend-mobpro-action/actions/runs/8367297431/job/22909352478

Copy link
Owner Author

@tnyo43 tnyo43 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment


works fine 👍

Run node ${GITHUB_ACTION_PATH}/dist/index.js
******* DEBUG is ENABLED *******
option {
token: '***',
prNumber: 25,
threshold: 4,
debug: true
}
number of the obtained comments is 2
It's not necessary to send a recommending comment yet.
https://github.com/tnyo43/recommend-mobpro-action/actions/runs/8367347978/job/22909520042

Copy link
Owner Author

@tnyo43 tnyo43 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment


Ok, it seems I need to keep uses: actions/checkout@v4 in test-action.yml

Error: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/recommend-mobpro-action/recommend-mobpro-action'. Did you forget to run actions/checkout before running your local action?
https://github.com/tnyo43/recommend-mobpro-action/actions/runs/8367398944/job/22909683370

Copy link
Owner Author

@tnyo43 tnyo43 Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment


if is not able to be used...

Error: /home/runner/work/recommend-mobpro-action/recommend-mobpro-action/./action.yml (Line: 22, Col: 3): Unexpected value 'if'
Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. /home/runner/work/recommend-mobpro-action/recommend-mobpro-action/./action.yml (Line: 22, Col: 3): Unexpected value 'if'
at GitHub.DistributedTask.ObjectTemplating.TemplateValidationErrors.Check()
at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Failed to load /home/runner/work/recommend-mobpro-action/recommend-mobpro-action/./action.yml
https://github.com/tnyo43/recommend-mobpro-action/actions/runs/8367458612/job/22909866952

Copy link
Owner Author

@tnyo43 tnyo43 Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment


👍
merge this and let's see how it works with "issue_comment" triggered events
https://github.com/tnyo43/recommend-mobpro-action/actions/runs/8367729497/job/22910647738

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
Loading