From b0857dcff7add0cacf7dc798546fea2bef64eb18 Mon Sep 17 00:00:00 2001 From: Leandro Costa Date: Tue, 17 Jun 2025 13:22:52 -0300 Subject: [PATCH 1/2] feat: support multiple destinations --- action.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index bc99544..ccccb16 100644 --- a/action.yml +++ b/action.yml @@ -38,4 +38,11 @@ runs: exit 1 fi - /kaniko/executor --dockerfile Dockerfile --context $GITHUB_WORKSPACE --destination "${{ inputs.image }}" + dest_flags="" + for dest in $(echo "${{ inputs.image }}" | tr ',' ' '); do + dest_flags="$dest_flags --destination=$dest" + done + + echo "Destinations: $dest_flags" + + /kaniko/executor --dockerfile Dockerfile --context $GITHUB_WORKSPACE $dest_flags From e3c4b9878e0a35594bbf6c33d5d73f2a14273a9e Mon Sep 17 00:00:00 2001 From: Leandro Costa Date: Tue, 17 Jun 2025 13:25:23 -0300 Subject: [PATCH 2/2] chore: add multi tag example --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 18e8ba3..00586f4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Build OCI images using Kaniko, with the Dockerfile contents provided directly as ## Usage -Example: +### Example: Basic Usage, all options. ```yaml jobs: @@ -21,3 +21,17 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} ``` + +### Example: Multiple Tags, Default registry + +```yaml +jobs: + cowsay: + runs-on: docker + steps: + - uses: https://git.kabelsalat.ch/s3lph/forgejo-kaniko-action@v1 + with: + image: my-user/test-image:latest,my-user/test-image:${{ github.sha }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} +```