Skip to content

Commit 4699c85

Browse files
Merge pull request #2 from francoto/fix_README
Fix readme snippet
2 parents 3ec0e6d + eb0dab9 commit 4699c85

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Test the Action
33
on:
44
push:
55
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
68

79
jobs:
810
test-rsmetacheck:
@@ -16,7 +18,6 @@ jobs:
1618
# defined in the root of the CURRENT repository.
1719
uses: ./
1820
with:
19-
input: "https://github.com/${{ github.repository }}"
2021
verbose: "true"
2122

2223
- name: Verify outputs generated

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout Code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525

2626
- name: Run RsMetaCheck
27-
uses: your-github-username/rsmetacheck-action@v1
27+
uses: SoftwareUnderstanding/rs-metacheck-action@0.3.1
28+
# optional arguments
2829
with:
29-
# You can pass the repository URL automatically
30-
input: "https://github.com/${{ github.repository }}"
31-
pitfalls_output: "./pitfalls_outputs"
30+
input: https://github.com/$GITHUB_REPOSITORY # if input is omited it will use GITHUB_REPOSITORY url
31+
pitfalls_output: "./pitfalls_outputs"
3232
verbose: "false"
3333
```
3434
@@ -45,6 +45,7 @@ jobs:
4545
| `branch` | Branch of the repository to analyze. | No | |
4646
| `generate_codemeta` | Generate codemeta files for each repository. | No | `false` |
4747
| `verbose` | Include both detected AND undetected pitfalls in the output JSON-LD. | No | `false` |
48+
| `config` | Specify the location of the `rsmetacheck.toml` to define the configuration. RSMetaCheck automatically detects a .rsmetacheck.toml (or rsmetacheck.toml) file at the working directory. | No | `rsmetacheck.toml` |
4849

4950
### Outputs
5051

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ branding:
88
inputs:
99
input:
1010
description: 'One or more: GitHub/GitLab URLs, JSON files containing repositories. (e.g. "https://github.com/owner/repo")'
11-
required: true
11+
required: false
12+
default: "https://github.com/${GITHUB_REPOSITORY}"
1213
skip_somef:
1314
description: "Skip SoMEF execution and analyze existing SoMEF output files directly."
1415
required: false

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ -n "$INPUT_INPUT" ]; then
99
# Note: Do not quote $INPUT_INPUT here in case multiple URLs are passed as spaces
1010
CMD="$CMD --input $INPUT_INPUT"
1111
else
12-
echo "Error: The 'input' argument is required."
12+
echo "Error: The 'input' argument is required and $GITHUB_REPOSITORY environment variable is not set. Please provide an input or run this action within a GitHub repository context."
1313
exit 1
1414
fi
1515

0 commit comments

Comments
 (0)