Skip to content

Commit

Permalink
add repo as parameter instead of hardcoding it
Browse files Browse the repository at this point in the history
Signed-off-by: Jimil Desai <[email protected]>
  • Loading branch information
jimil749 committed May 7, 2024
1 parent 2e748d1 commit 4c4ba1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/actions/kubernetes-project-new-images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This action can be used to notify the `cern-sis/kubernetes` repository that your
| `event-type` | Yes | String | The type of the event triggering this action. `release` or `update`. |
| `images` | Yes | String | The list of new images available. |
| `token` | Yes | String | The Personal Access Token used to send the event. |
| `repo` | Yes | String | Repository to fire the dispatch event to |

## Examples

Expand All @@ -22,6 +23,7 @@ jobs:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/kubernetes-project-new-images@v6
with:
repo: cern-sis/myrepo
event-type: update
images: |
registry.cern.ch/cern-sis/mycoolproject/mytestimage:v1
Expand All @@ -36,6 +38,7 @@ jobs:
- name: send event
uses: cern-sis/gh-workflows/.github/actions/kubernetes-project-new-images@v6
with:
repo: cern-sis/myrepo
event-type: release
images: myorg/myotherproject@sha256:xxzxzxzxz
token: ${{ secrets.PAT }}
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/kubernetes-project-new-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
images:
required: true
type: string
repo:
required: true
type: string
token:
required: true
type: string
Expand All @@ -28,7 +31,7 @@ runs:
- uses: peter-evans/repository-dispatch@v1
with:
repository: cern-sis/kubernetes-scoap3
repository: ${{ inputs.repo }}
event-type: project-${{ inputs.event-type }}
token: ${{ inputs.token }}
client-payload: ${{ env.PAYLOAD }}
Expand Down

0 comments on commit 4c4ba1f

Please sign in to comment.