Skip to content

Commit 04f1c8b

Browse files
committed
Docker push workflow 5
1 parent 589d4e2 commit 04f1c8b

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

docs/dev-notes/workflows/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
There are two workflows setup on this repo:
44

5-
| Worflow | Status and link | Description |
6-
| --------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------: |
7-
| [build-and-test](/.github/workflows/build-test.yml) | [![Build and test](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/build-test.yml/badge.svg)](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) | [![Test GitHub action](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml/badge.svg)](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml) | Builds and tests the GitHub action |
5+
| Worflow | Status and link | Description |
6+
| ------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------------------------: |
7+
| [build-and-test](/.github/workflows/build-test.yml) | [![Build and test](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/build-test.yml/badge.svg)](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) | [![Test GitHub action](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/test-action.yml/badge.svg)](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) | [![Publish Docker image](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/publish-docker-image.yml/badge.svg)](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/publish-docker-image.yml) | Publishes Docker image used by this action to GitHub packages |
910

1011
## Workflows' documentation
1112

1213
- [build-and-test](/docs/dev-notes/workflows/build-and-test-workflow.md)
1314
- [test-action](/docs/dev-notes/workflows/test-action-workflow.md)
15+
- [publish-docker-image](/docs/dev-notes/workflows/publish-docker-image.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# publish-docker-image workflow
2+
3+
[![Publish Docker image](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/publish-docker-image.yml/badge.svg)](https://github.com/edumserrano/github-issue-forms-parser/actions/workflows/publish-docker-image.yml)
4+
5+
[This workflow](/.github/workflows/publish-docker-image.yml):
6+
7+
- Builds and publishes to GitHub packages the Docker image that is used by this action.
8+
9+
The action on this repo is [configured to use the Docker image](/action.yml)) that is published by this workflow.

docs/dev-notes/workflows/test-action-workflow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@
1111
- Checks that action should fail the workflow if the action fails.
1212

1313
Since this workflow executes the [Docker container action](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) it will build and execute the docker container so if there are any issues with the action's [Dockerfile](/Dockerfile) this workflow will detect it.
14+
15+
> **Note**
16+
> For this workflow to be able to test the action when code is pushed I created an alternate `action.yml` at `/action-local` that will build the Docker image from the repo instead of using the Docker image published in the GitHub packages (which is what the `action.yml` at the root of the repo does).
17+
> The downside of this approach is that I need to keep both `action.yml` files, the one at the root of the repo and the one at `/action-local`, in sync.
18+
> Alternativel, I could try to setup the workflows so that this test workflow only runs after the Docker image has been published. However this approach also has problems to solve such as making sure that the checks work as expected in a pull request scenario. The current approach eliminates all problems of this type with the only downside of keeping the `action.yml` files in sync.

0 commit comments

Comments
 (0)