Skip to content

Commit 5e2f79f

Browse files
committed
Added details for how to run the binary directly
1 parent adde92d commit 5e2f79f

File tree

1 file changed

+54
-4
lines changed

1 file changed

+54
-4
lines changed

README.md

+54-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ Below is a list of GitHub-hosted runners that support jobs using this action.
2727
| Runner | Supported? |
2828
|------------|:----------:|
2929
| [![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=flat&logo=ubuntu&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) ||
30-
| [![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat\&logo=windows\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) ||
31-
| [![macOS](https://img.shields.io/badge/macOS-000000?style=flat\&logo=macos\&logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) ||
30+
| [![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat\&logo=windows\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) | ⚠️ |
31+
| [![macOS](https://img.shields.io/badge/macOS-000000?style=flat\&logo=macos\&logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) | ⚠️ |
32+
33+
> [!NOTE]
34+
> Windows and macOS is supported locally only.
3235
3336
## Inputs
3437
The following inputs are available:
@@ -103,7 +106,7 @@ jobs:
103106
```
104107
105108
## Running locally or from another third-party pipeline
106-
Since this action is container-based, it can be ran locally or from another third-party pipeline using bash, for example, Azure Pipelines. First, create a [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with at least `read:packages` permissions from [here](https://github.com/settings/tokens/new?scopes=read:packages), and run the following commands from the root directory of a maven project:
109+
Since this action is container-based, it can be ran locally or from another third-party pipeline, for example, Azure Pipelines. First, create a [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with at least `read:packages` permissions from [here](https://github.com/settings/tokens/new?scopes=read:packages), and run the following commands from the root directory of a maven project:
107110

108111
```bash
109112
echo <YOUR_GITHUB_PAT> | docker login ghcr.io -u <YOUR_GITHUB_USERNAME> --password-stdin
@@ -116,7 +119,54 @@ docker run --name maven-version-checker --workdir=/data --rm \
116119
ghcr.io/stevenjdh/maven-version-checker:latest
117120
```
118121

119-
If all goes well, there will be two generated files called `summary.txt` and `output.txt` that can be leveraged for further processing.
122+
If all goes well, the `summary.txt` and `output.txt` files will be updated so that they can be leveraged for further processing.
123+
124+
Alternatively, compile the code for the target OS using a matching [Runtime Identifier (RID)](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids), and run directly from the command line using the following:
125+
126+
**Linux**
127+
128+
```bash
129+
git clone https://github.com/StevenJDH/maven-version-checker.git
130+
cd maven-version-checker
131+
dotnet publish -r linux-x64 -c Release --property:PublishDir=./bin/Publish
132+
133+
export INPUT_LOCATION="./pom.xml"
134+
export GITHUB_STEP_SUMMARY="./summary.txt"
135+
export GITHUB_OUTPUT="./output.txt"
136+
137+
./MavenVersionChecker.Action
138+
```
139+
140+
**Windows**
141+
142+
```batch
143+
git clone https://github.com/StevenJDH/maven-version-checker.git
144+
cd maven-version-checker
145+
dotnet publish -r win-x64 -c Release --property:PublishDir=./bin/Publish
146+
147+
set INPUT_LOCATION=./pom.xml
148+
set GITHUB_STEP_SUMMARY=./summary.txt
149+
set GITHUB_OUTPUT=./output.txt
150+
151+
MavenVersionChecker.Action.exe
152+
```
153+
154+
**macOS (Apple Silicon)**
155+
156+
```bash
157+
git clone https://github.com/StevenJDH/maven-version-checker.git
158+
cd maven-version-checker
159+
dotnet publish -r osx-arm64 -c Release --property:PublishDir=./bin/Publish
160+
161+
export INPUT_LOCATION="./pom.xml"
162+
export GITHUB_STEP_SUMMARY="./summary.txt"
163+
export GITHUB_OUTPUT="./output.txt"
164+
165+
./MavenVersionChecker.Action
166+
```
167+
168+
> [!IMPORTANT]
169+
> When running locally, ensure that the `summary.txt` and `output.txt` files exist or are created before running the application. The [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) also needs to be installed in order to compile the code, which may be already included as part of the needed [Prerequisites](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=windows%2Cnet8#prerequisites).
120170

121171
## Enabling the chaos strategies
122172
To enable the chaos strategies, set an environment variable called `ASPNETCORE_ENVIRONMENT` to `Chaos` and restart the application. If using Visual Studio or another compatible IDE, select the `ChaosConsole (Multi)` profile before running the code. Supported chaos strategies include ConcurrencyLimiter, ChaosLatency, ChaosFault, and ChaosOutcome to test the standard resilience strategies being used and the business logic around it.

0 commit comments

Comments
 (0)