Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaotictrials/action-test-different-property
An action for testing a codebase with different properties.
https://github.com/chaotictrials/action-test-different-property
Last synced: about 19 hours ago
JSON representation
An action for testing a codebase with different properties.
- Host: GitHub
- URL: https://github.com/chaotictrials/action-test-different-property
- Owner: ChaoticTrials
- License: mit
- Created: 2024-07-08T17:21:00.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T13:31:02.000Z (4 months ago)
- Last Synced: 2024-07-12T15:06:24.158Z (4 months ago)
- Language: TypeScript
- Size: 491 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# action-test-different-property
An action for testing a codebase with different properties.
## Usage
This GitHub Action modifies a specified property in a Gradle properties file,
runs a Gradle task, and creates an issue if the task fails.### Inputs
| Name | Description | Required | Default |
| :---------------: | :------------------------------------------------: | :------: | :-----------------------: |
| `gradle-property` | The Gradle property to modify | Yes | |
| `gradle-value` | The value to set for the Gradle property | Yes | |
| `gradle-task` | The Gradle task to run | No | `build` |
| `github-token` | GitHub token for creating an issue | No | `${{ env.GITHUB_TOKEN }}` |
| `properties-file` | The file where the property should be set/replaced | Yes | |
| `issue-title` | The title of the issue | Yes | |
| `issue-comment` | The main body of the issue (supports multiline) | No | |
| `issue-labels` | A comma separated list of labels | No | |### Example Workflow
```yaml
name: Run Gradle Taskon: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: write
contents: readsteps:
- name: Checkout repository
uses: actions/checkout@v2- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'- name: Run Gradle Task
uses: your-username/your-repo@main
with:
gradle-property: 'my.property'
gradle-value: 'myValue'
gradle-task: 'myTask'
github-token: ${{ secrets.GITHUB_TOKEN }}
properties-file: 'gradle.properties'
issue-title: 'Gradle task failed'
issue-comment: |
The Gradle task ${{ inputs.gradle-task }} failed.
Please check the logs for more details.
issue-labels: 'bug, gradle'
```