Skip to content

Commit

Permalink
feat: make git_url optional
Browse files Browse the repository at this point in the history
default value is `${{ github.server_url }}/${{ github.repository }}`
  • Loading branch information
jamacku authored and zmiklank committed May 29, 2024
1 parent f965d7f commit 07b8a51
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/base-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: ./
with:
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
git_url: "https://github.com/sclorg/testing-farm-as-github-action"
git_ref: "main"
tmt_plan_regex: "smoke_plan"
pull_request_status_name: "Smoke test"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/github_summary_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: ./
with:
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
git_url: "https://github.com/sclorg/testing-farm-as-github-action"
git_ref: "main"
tmt_plan_regex: "smoke_plan"
pull_request_status_name: "GitHub summary test"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/secrets_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: ./
with:
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
git_url: "https://github.com/sclorg/testing-farm-as-github-action"
git_ref: "main"
tmt_plan_regex: "secrets_plan"
pull_request_status_name: "Secrets test"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/variables_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: ./
with:
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
git_url: "https://github.com/sclorg/testing-farm-as-github-action"
git_ref: "main"
tmt_plan_regex: "variables_plan"
pull_request_status_name: "Variables test"
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ See [Testing Farm onboarding guide](https://docs.testing-farm.io/Testing%20Farm/

| Input Name | Description | Default value |
|------------|-------------|---------------|
| `git_url` | An url to the repository with tmt metadata | empty, **required from user** |
| `git_url` | An url to the repository with tmt metadata | url of repo that runs GHA |
| `git_ref` | A tmt tests branch which will be used for tests | master |
| `tmt_plan_regex` | A regular expression used to select tmt plans | all |
| `tmt_context` | A mapping of tmt context variable [tmt-context](https://tmt.readthedocs.io/en/latest/spec/context.html), variables separated by ; | empty |
Expand Down Expand Up @@ -126,7 +126,6 @@ jobs:
uses: sclorg/testing-farm-as-github-action@v2
with:
api_key: ${{ secrets.TF_API_KEY }}
git_url: https://github.com/sclorg/sclorg-testing-farm
tmt_plan_regex: "centos"
pull_request_status_name: "CentOS 7"
```
Expand Down Expand Up @@ -159,5 +158,4 @@ jobs:
uses: sclorg/testing-farm-as-github-action@v2
with:
api_key: ${{ secrets.TF_API_KEY }}
git_url: https://github.com/sclorg/sclorg-testing-farm
```
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ inputs:
required: true
git_url:
description: 'An url to the GIT repository with TMT plans'
required: true
required: false
default: '${{ github.server_url }}/${{ github.repository }}'
git_ref:
description: 'A TMT tests branch which will be used for tests'
required: false
Expand Down

0 comments on commit 07b8a51

Please sign in to comment.