You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write-Output "::error title=Action check:Action should have failed the workflow because of invalid input but it didn't."
107
+
Exit 1
108
+
}
109
+
else
110
+
{
111
+
Write-Output "::notice title=Action check::Action would have failed the workflow given invalid input. You should see an error message on the action's Annotations."
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/build-test.yml)
Copy file name to clipboardExpand all lines: docs/dev-notes/README.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,13 +69,17 @@ To pass arguments to the app when debugging you can use the `commandLineArgs` in
69
69
The steps below show how to run the Docker container action against a set of test data provided by the repo. However you can follow the same steps and provide any data you wish to test.
70
70
71
71
1) Clone the repo and browse to the repo's directory.
72
-
2) Run `docker build -t github-issue-parser .`
73
-
3) Read the test issue form body into the variable `$issueBody` by doing: `$issueBody = Get-Content GitHubIssueFormsParser/tests/GitHubIssuesParserCli.Tests/TestFiles/IssueBody.md -Raw`
74
-
4) Run the docker container by executing:
72
+
2) Create an empty file named `github-step-output.txt` that will store the GitHub step output of the action. To create an empty file you can do something like `echo $null >> github-step-output.txt`.
73
+
3) Run `docker build -t github-issue-parser .`
74
+
4) Read the test issue form body into the variable `$issueBody` by doing: `$issueBody = Get-Content GitHubIssueFormsParser/tests/GitHubIssuesParserCli.Tests/TestFiles/IssueBody.md -Raw`
75
+
5) Run the docker container by executing:
75
76
76
77
```
77
-
docker run --rm -v ${pwd}:/workspace --workdir /workspace github-issue-parser `
78
-
parse-issue-form `
78
+
docker run --env GITHUB_OUTPUT=/workspace/github-step-output.txt `
@@ -126,6 +130,12 @@ To understand better how the action builds and executes the Docker container loo
126
130
127
131
### As of writing this, the log for building the docker action looks as follows
128
132
133
+
> **Note**
134
+
>
135
+
> This is the log when building the docker image for the action, which only happens on the [test-action workflow](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml) because using the published action from GitHub Marketplace will download the package from the GitHub packages and so the log will look different.
136
+
>
137
+
> The information mentioned here is still valuable to understand more about how GitHub Docker actions work.
138
+
129
139
```
130
140
/usr/bin/docker build
131
141
-t 2bcf09:d996dfb6f4ec40c1a59c1e244bdd3374
@@ -145,6 +155,12 @@ This way it can successfully build the Dockerfile for this action which would ot
145
155
146
156
### As of writing this, the log for running the docker action looks as follows
147
157
158
+
> **Note**
159
+
>
160
+
> This is the log when building the docker image for the action, which only happens on the [test-action workflow](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml) because using the published action from GitHub Marketplace will download the package from the GitHub packages and so the log will look different.
161
+
>
162
+
> The information mentioned here is still valuable to understand more about how GitHub Docker actions work.
|[build-and-test](/.github/workflows/build-test.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/build-test.yml)| Builds the solution and runs tests |
8
-
|[test-action](/.github/workflows/test-action.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml)| Builds and tests the GitHub action |
9
-
|[publish-docker-image](/.github/workflows/publish-docker-image.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/publish-docker-image.yml)| Publishes Docker image used by this action to GitHub packages |
10
-
|[package-retention-policy](/.github/workflows/package-retention-policy.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/package-retention-policy.yml)| Removes old Docker images used by this action from GitHub packages |
|[build-and-test](/.github/workflows/build-test.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/build-test.yml)| Builds the solution and runs tests |
8
+
|[test-action](/.github/workflows/test-action.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml)| Builds and tests the GitHub action. Builds the action from this repo. |
9
+
|[test-action-gh-marketplace](/.github/workflows/test-action-gh-marketplace.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action-gh-marketplace.yml)| Builds and tests the GitHub action. Uses the published version to GitHub Marketplace. |
10
+
|[publish-docker-image](/.github/workflows/publish-docker-image.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/publish-docker-image.yml)| Publishes Docker image used by this action to GitHub packages |
11
+
|[package-retention-policy](/.github/workflows/package-retention-policy.yml)|[](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/package-retention-policy.yml)| Removes old Docker images used by this action from GitHub packages |
- Is a copy of the [test-action workflow](/.github/workflows/test-action.yml). See the [documentation for that workflow](/docs/dev-notes/workflows/test-action-workflow.md) for more info.
8
+
- The main difference from this workflow and the `test-action workflow` are:
9
+
- Tests the GitHub action from the Marketplace instead of building it from this repo. It makes sure that the published version is working.
10
+
- Does not run against PRs because it shouldn't add a status check to PRs.
0 commit comments