From ace3eac443dda2ad32104d74964afbba0341262a Mon Sep 17 00:00:00 2001 From: michalby24 Date: Tue, 1 Jul 2025 19:39:37 +0300 Subject: [PATCH 01/11] fix(update-artifacts-file): artifacts.json will change in the remote helm-charts repo --- .../workflows/test-update-artifacts-file.yml | 8 ++--- actions/update-artifacts-file/README.md | 22 ++++++------ actions/update-artifacts-file/action.yaml | 26 ++++++++++---- .../update-artifacts-file/commit_changes.sh | 23 +++++++------ .../update-artifacts-file/modify_artifacts.sh | 34 +++++++++++-------- 5 files changed, 68 insertions(+), 45 deletions(-) diff --git a/.github/workflows/test-update-artifacts-file.yml b/.github/workflows/test-update-artifacts-file.yml index ce02b72c..be98bcf5 100644 --- a/.github/workflows/test-update-artifacts-file.yml +++ b/.github/workflows/test-update-artifacts-file.yml @@ -17,10 +17,10 @@ jobs: - name: Update artifacts.json uses: ./actions/update-artifacts-file with: - type: "docker" + type: "helm" context: actions/update-artifacts-file - domain: test - artifact_name: "sftpgo" - artifact_tag: "v2.0.4" + domain: infra + artifact_name: "jenkins" + artifact_tag: "5.0.17" registry: ${{ secrets.ACR_URL }} github_token: ${{ secrets.GH_PAT }} diff --git a/actions/update-artifacts-file/README.md b/actions/update-artifacts-file/README.md index 69b02cab..d481b863 100644 --- a/actions/update-artifacts-file/README.md +++ b/actions/update-artifacts-file/README.md @@ -14,15 +14,16 @@ This GitHub Action builds and publishes a Helm chart to a specified registry and ## 🛠 Inputs -| Name | Description | Required | Default | -|------------------|-----------------------------------------------------------------------------|----------|-----------------| -| `scope` | The directory name used as a logical scope for the artifact | ✅ Yes | | -| `context` | Path to the directory containing the Helm chart and helper scripts | ❌ No | `./helm` | -| `registry` | Registry URL the artifact is pushed to (e.g., ACR address) | ✅ Yes | | -| `type` | Type of artifact (`helm`, `docker`, etc.) | ✅ Yes | | -| `artifact_name` | Name of the artifact (e.g. `sftpgo`, `minio`) | ✅ Yes | | -| `artifact_tag` | Tag or version of the artifact (e.g. `v1.2.3`, `latest`) | ✅ Yes | | -| `github_token` | GitHub token with permission to commit & push changes | ✅ Yes | | +| Name | Description | Required | Default | +|------------------|-----------------------------------------------------------------------------|----------|------------------------------| +| `domain` | Logical scope or namespace for the artifact (used as subdirectory name) | ✅ Yes | | +| `artifact_name` | Name of the artifact (e.g. `sftpgo`, `minio`) | ✅ Yes | | +| `artifact_tag` | Tag or version of the artifact (e.g. `v1.2.3`, `latest`) | ✅ Yes | | +| `type` | Type of artifact (`helm`, `docker`, etc.) | ✅ Yes | | +| `registry` | Registry URL the artifact is pushed to (e.g., ACR address) | ✅ Yes | | +| `github_token` | GitHub token with permission to clone, commit & push to the target repo | ✅ Yes | | +| `target_repo` | Target GitHub repo where `artifacts.json` should be updated (e.g. `org/repo`)| ❌ No | `mapcolonies/helm-charts` | +| `context` | Path to the directory containing the shell scripts | ❌ No | `./helm` | --- @@ -34,9 +35,10 @@ This GitHub Action builds and publishes a Helm chart to a specified registry and - name: Update artifacts.json uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.0.0 with: - scope: infra + domain: infra artifact_name: "sftpgo" artifact_tag: "v2.0.2" + type: "docker" registry: ${{ secrets.ACR_URL }} github_token: ${{ secrets.GH_PAT }} ``` diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index fee43aa3..9abef43b 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -23,16 +23,24 @@ inputs: description: "Artifact`s tag" type: string required: true + github_token: + description: "GitHub token with access to target repository" + required: true + target_repo: + description: "Target GitHub repository" + required: false + default: "mapcolonies/helm-charts" runs: using: "composite" steps: - - name: Checkout helm chart repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Clone target repo + run: | + git clone https://x-access-token:${{ inputs.github_token }}@github.com/${{ inputs.target_repo }}.git temp_helm_charts + shell: bash - name: Set Execute Permission - run: chmod +x ./modify_artifacts.sh + run: chmod +x ${{ inputs.context }}/modify_artifacts.sh shell: bash - working-directory: ${{ inputs.context }} - name: Run modify artifacts Script run: ${{ inputs.context }}/modify_artifacts.sh @@ -43,11 +51,11 @@ runs: ARTIFACT_TAG: ${{ inputs.artifact_tag }} TYPE: ${{ inputs.type }} REGISTRY: ${{ inputs.registry }} + TARGET_DIR: temp_helm_charts - name: Set commit Permission - run: chmod +x ./commit_changes.sh + run: chmod +x ${{ inputs.context }}/commit_changes.sh shell: bash - working-directory: ${{ inputs.context }} - name: Run commit changes script run: ${{ inputs.context }}/commit_changes.sh @@ -58,3 +66,9 @@ runs: ARTIFACT_TAG: ${{ inputs.artifact_tag }} TYPE: ${{ inputs.type }} GITHUB_TOKEN: ${{ inputs.github_token }} + TARGET_REPO: ${{ inputs.target_repo }} + TARGET_DIR: temp_helm_charts + + - name: Clean up target repo folder + run: rm -rf temp_helm_charts + shell: bash diff --git a/actions/update-artifacts-file/commit_changes.sh b/actions/update-artifacts-file/commit_changes.sh index 50a4ca72..ae89ae67 100644 --- a/actions/update-artifacts-file/commit_changes.sh +++ b/actions/update-artifacts-file/commit_changes.sh @@ -1,26 +1,27 @@ #!/bin/bash -cd $DOMAIN -git config --global user.name "mapcolonies[bot]" -git config --global user.email "devops[bot]@mapcolonies.com" +cd "$TARGET_DIR" -git add . -# Add "|| true" for not failing on this line 1 -git commit -m "chore: update artifacts.json for $DOMAIN" -m "with $TYPE artifact: $ARTIFACT_NAME:$ARTIFACT_TAG" || true +git config user.name "mapcolonies[bot]" +git config user.email "devops[bot]@mapcolonies.com" + +git add "$DOMAIN/artifacts.json" +git commit -m "chore: update artifacts.json for $DOMAIN" -m "with $TYPE artifact: $ARTIFACT_NAME:$ARTIFACT_TAG" || echo "Nothing to commit" success=false for ((i=1; i<=5; i++)); do - echo "Attempt number $i" - if GIT_ASKPASS=echo git push https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git; then + echo "Attempt $i to push changes..." + if git push https://x-access-token:$GITHUB_TOKEN@github.com/$TARGET_REPO.git; then success=true + echo "Push succeeded" break else + echo "Push failed, retrying after pull" + git pull origin master --ff-only || true sleep 5 - # --ff for fast-forward - git pull origin master --ff fi done if [ "$success" = false ]; then - echo "Failed to push changes." + echo "Failed to push changes after 5 attempts." exit 1 fi diff --git a/actions/update-artifacts-file/modify_artifacts.sh b/actions/update-artifacts-file/modify_artifacts.sh index 645ad90a..30919caa 100644 --- a/actions/update-artifacts-file/modify_artifacts.sh +++ b/actions/update-artifacts-file/modify_artifacts.sh @@ -1,15 +1,21 @@ #!/bin/bash -# Check if the directory exists -if [ -d "$DOMAIN" ]; then - path="$DOMAIN/artifacts.json" - # Create a default empty JSON if the file doesn't exist - [[ -f "$path" ]] || echo '{}' > "$path" - # Ensure nested structure and assign artifact tag - jq --arg type "$TYPE" \ - --arg registry "$REGISTRY" \ - --arg key "${DOMAIN}/$ARTIFACT_NAME" \ - --arg tag "$ARTIFACT_TAG" \ - '.[$type][$registry][$key] = $tag' "$path" > tmp.json && mv tmp.json "$path" -else - echo "Directory $REGISTRY/$DOMAIN does not exist" -fi +ARTIFACTS_PATH="$TARGET_DIR/$DOMAIN/artifacts.json" + +# Make sure the directory exists +mkdir -p "$(dirname "$ARTIFACTS_PATH")" + +# If the file doesn't exist, initialize it +[[ -f "$ARTIFACTS_PATH" ]] || echo '{}' > "$ARTIFACTS_PATH" + +# Ensure nested structure and assign artifact tag +tmp_file=$(mktemp) +jq --arg type "$TYPE" \ + --arg registry "$REGISTRY" \ + --arg key "${DOMAIN}/${ARTIFACT_NAME}" \ + --arg tag "$ARTIFACT_TAG" ' + .[$type] += {} | + .[$type][$registry] += {} | + .[$type][$registry][$key] = $tag +' "$ARTIFACTS_PATH" > "$tmp_file" && mv "$tmp_file" "$ARTIFACTS_PATH" + +echo "artifacts.json updated successfully at $ARTIFACTS_PATH" From 5073813725c5ca11e348fb6f193330bbfd168ae4 Mon Sep 17 00:00:00 2001 From: michalby24 Date: Wed, 2 Jul 2025 13:43:50 +0300 Subject: [PATCH 02/11] fix(update-artifacts-file): remove context --- .github/workflows/test-update-artifacts-file.yml | 1 - actions/update-artifacts-file/action.yaml | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-update-artifacts-file.yml b/.github/workflows/test-update-artifacts-file.yml index be98bcf5..5c2fd2e5 100644 --- a/.github/workflows/test-update-artifacts-file.yml +++ b/.github/workflows/test-update-artifacts-file.yml @@ -18,7 +18,6 @@ jobs: uses: ./actions/update-artifacts-file with: type: "helm" - context: actions/update-artifacts-file domain: infra artifact_name: "jenkins" artifact_tag: "5.0.17" diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index 9abef43b..2905f93e 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -7,10 +7,6 @@ inputs: registry: description: "Registry to push the artifact to." required: true - context: - description: "Path to the helm directory." - required: false - default: "./helm" type: description: "Artifact`s type" type: string @@ -39,11 +35,11 @@ runs: shell: bash - name: Set Execute Permission - run: chmod +x ${{ inputs.context }}/modify_artifacts.sh + run: chmod +x actions/update-artifacts-file/modify_artifacts.sh shell: bash - name: Run modify artifacts Script - run: ${{ inputs.context }}/modify_artifacts.sh + run: actions/update-artifacts-file/modify_artifacts.sh shell: bash env: DOMAIN: ${{ inputs.domain }} @@ -54,11 +50,11 @@ runs: TARGET_DIR: temp_helm_charts - name: Set commit Permission - run: chmod +x ${{ inputs.context }}/commit_changes.sh + run: chmod +x actions/update-artifacts-file/commit_changes.sh shell: bash - name: Run commit changes script - run: ${{ inputs.context }}/commit_changes.sh + run: actions/update-artifacts-file/commit_changes.sh shell: bash env: DOMAIN: ${{ inputs.domain }} From 1e96ffe785c50e33436a5c23face27dc68d6a020 Mon Sep 17 00:00:00 2001 From: michalby24 Date: Wed, 2 Jul 2025 13:44:37 +0300 Subject: [PATCH 03/11] fix(update-artifacts-file): debug --- .github/workflows/test-update-artifacts-file.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-update-artifacts-file.yml b/.github/workflows/test-update-artifacts-file.yml index 5c2fd2e5..d7f7780e 100644 --- a/.github/workflows/test-update-artifacts-file.yml +++ b/.github/workflows/test-update-artifacts-file.yml @@ -1,6 +1,8 @@ name: Update artifacts.json on: + workflow_dispatch: + workflow_call: push: branches: - master From f2a3f554493e7a343a5d0885be5bbec66a14af67 Mon Sep 17 00:00:00 2001 From: michalby24 Date: Wed, 2 Jul 2025 13:47:25 +0300 Subject: [PATCH 04/11] fix(update-artifacts-file): remove debug --- .github/workflows/test-update-artifacts-file.yml | 2 -- actions/update-artifacts-file/README.md | 1 - 2 files changed, 3 deletions(-) diff --git a/.github/workflows/test-update-artifacts-file.yml b/.github/workflows/test-update-artifacts-file.yml index d7f7780e..5c2fd2e5 100644 --- a/.github/workflows/test-update-artifacts-file.yml +++ b/.github/workflows/test-update-artifacts-file.yml @@ -1,8 +1,6 @@ name: Update artifacts.json on: - workflow_dispatch: - workflow_call: push: branches: - master diff --git a/actions/update-artifacts-file/README.md b/actions/update-artifacts-file/README.md index d481b863..cab0e5e0 100644 --- a/actions/update-artifacts-file/README.md +++ b/actions/update-artifacts-file/README.md @@ -23,7 +23,6 @@ This GitHub Action builds and publishes a Helm chart to a specified registry and | `registry` | Registry URL the artifact is pushed to (e.g., ACR address) | ✅ Yes | | | `github_token` | GitHub token with permission to clone, commit & push to the target repo | ✅ Yes | | | `target_repo` | Target GitHub repo where `artifacts.json` should be updated (e.g. `org/repo`)| ❌ No | `mapcolonies/helm-charts` | -| `context` | Path to the directory containing the shell scripts | ❌ No | `./helm` | --- From 61218ddcf27f409b3b658c4afe4bc6d41bd8bea8 Mon Sep 17 00:00:00 2001 From: michalby24 Date: Thu, 3 Jul 2025 09:30:51 +0300 Subject: [PATCH 05/11] fix(update-artifacts-file): checkout --- actions/update-artifacts-file/action.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index 2905f93e..cf830f60 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -29,10 +29,12 @@ inputs: runs: using: "composite" steps: - - name: Clone target repo - run: | - git clone https://x-access-token:${{ inputs.github_token }}@github.com/${{ inputs.target_repo }}.git temp_helm_charts - shell: bash + - name: Checkout helm chart repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: mapcolonies/helm-charts + token: ${{ inputs.github_token }} + path: temp_helm_charts - name: Set Execute Permission run: chmod +x actions/update-artifacts-file/modify_artifacts.sh From a6b93c9131773bc01d838c5ee40a0c66f152561c Mon Sep 17 00:00:00 2001 From: michalby24 Date: Thu, 3 Jul 2025 11:17:49 +0300 Subject: [PATCH 06/11] fix(update-artifacts-file): global var --- actions/update-artifacts-file/action.yaml | 47 +++++++++++++---------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index cf830f60..20c88e2a 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -1,23 +1,25 @@ name: "Update Artifacts File" -description: "An action to update the artifacts file" +description: "An action to update the artifacts file in a different repository" + inputs: domain: - description: "domain or namespace for the artifact." + description: "Domain or namespace for the artifact." required: true registry: description: "Registry to push the artifact to." required: true + context: + description: "Path to the action directory." + required: false + default: "./helm" type: - description: "Artifact`s type" - type: string + description: "Artifact type" required: true artifact_name: - description: "Artifact`s name" - type: string + description: "Artifact name" required: true artifact_tag: - description: "Artifact`s tag" - type: string + description: "Artifact tag" required: true github_token: description: "GitHub token with access to target repository" @@ -26,6 +28,11 @@ inputs: description: "Target GitHub repository" required: false default: "mapcolonies/helm-charts" + target_path: + description: "Local path to clone the target repo into" + required: false + default: "temp_helm_charts" + runs: using: "composite" steps: @@ -34,14 +41,14 @@ runs: with: repository: mapcolonies/helm-charts token: ${{ inputs.github_token }} - path: temp_helm_charts + path: ${{ inputs.target_path }} - - name: Set Execute Permission - run: chmod +x actions/update-artifacts-file/modify_artifacts.sh + - name: Set execute permission on modify script + run: chmod +x ${{ inputs.context }}/modify_artifacts.sh shell: bash - - name: Run modify artifacts Script - run: actions/update-artifacts-file/modify_artifacts.sh + - name: Run modify artifacts script + run: ${{ inputs.context }}/modify_artifacts.sh shell: bash env: DOMAIN: ${{ inputs.domain }} @@ -49,14 +56,14 @@ runs: ARTIFACT_TAG: ${{ inputs.artifact_tag }} TYPE: ${{ inputs.type }} REGISTRY: ${{ inputs.registry }} - TARGET_DIR: temp_helm_charts + TARGET_DIR: ${{ inputs.target_path }} - - name: Set commit Permission - run: chmod +x actions/update-artifacts-file/commit_changes.sh + - name: Set execute permission on commit script + run: chmod +x ${{ inputs.context }}/commit_changes.sh shell: bash - - name: Run commit changes script - run: actions/update-artifacts-file/commit_changes.sh + - name: Commit and push changes + run: ${{ inputs.context }}/commit_changes.sh shell: bash env: DOMAIN: ${{ inputs.domain }} @@ -65,8 +72,8 @@ runs: TYPE: ${{ inputs.type }} GITHUB_TOKEN: ${{ inputs.github_token }} TARGET_REPO: ${{ inputs.target_repo }} - TARGET_DIR: temp_helm_charts + TARGET_DIR: ${{ inputs.target_path }} - name: Clean up target repo folder - run: rm -rf temp_helm_charts + run: rm -rf ${{ inputs.target_path }} shell: bash From 25c4866e5b7f32d82050ca7e8226547abf64978f Mon Sep 17 00:00:00 2001 From: michalby24 Date: Thu, 3 Jul 2025 12:56:59 +0300 Subject: [PATCH 07/11] fix(update-artifacts-file): context --- actions/update-artifacts-file/action.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index 20c88e2a..4cb8f938 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -8,10 +8,6 @@ inputs: registry: description: "Registry to push the artifact to." required: true - context: - description: "Path to the action directory." - required: false - default: "./helm" type: description: "Artifact type" required: true @@ -44,11 +40,11 @@ runs: path: ${{ inputs.target_path }} - name: Set execute permission on modify script - run: chmod +x ${{ inputs.context }}/modify_artifacts.sh + run: chmod +x actions/update-artifacts-file/modify_artifacts.sh shell: bash - name: Run modify artifacts script - run: ${{ inputs.context }}/modify_artifacts.sh + run: actions/update-artifacts-file/modify_artifacts.sh shell: bash env: DOMAIN: ${{ inputs.domain }} @@ -59,11 +55,11 @@ runs: TARGET_DIR: ${{ inputs.target_path }} - name: Set execute permission on commit script - run: chmod +x ${{ inputs.context }}/commit_changes.sh + run: chmod +x actions/update-artifacts-file/commit_changes.sh shell: bash - name: Commit and push changes - run: ${{ inputs.context }}/commit_changes.sh + run: actions/update-artifacts-file/commit_changes.sh shell: bash env: DOMAIN: ${{ inputs.domain }} From f220a152949175ba9a3028b331e930d46e1e5077 Mon Sep 17 00:00:00 2001 From: michalby24 Date: Thu, 3 Jul 2025 13:01:15 +0300 Subject: [PATCH 08/11] fix(update-artifacts-file): readme --- actions/update-artifacts-file/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/actions/update-artifacts-file/README.md b/actions/update-artifacts-file/README.md index cab0e5e0..d26869b5 100644 --- a/actions/update-artifacts-file/README.md +++ b/actions/update-artifacts-file/README.md @@ -23,6 +23,7 @@ This GitHub Action builds and publishes a Helm chart to a specified registry and | `registry` | Registry URL the artifact is pushed to (e.g., ACR address) | ✅ Yes | | | `github_token` | GitHub token with permission to clone, commit & push to the target repo | ✅ Yes | | | `target_repo` | Target GitHub repo where `artifacts.json` should be updated (e.g. `org/repo`)| ❌ No | `mapcolonies/helm-charts` | +| `target_path` | Local path to clone the target repo into | ❌ No | `temp_helm_charts` | --- From 5b314a7de01e25e6f10502820cfc0cd16964c11e Mon Sep 17 00:00:00 2001 From: michalby24 Date: Thu, 3 Jul 2025 15:35:22 +0300 Subject: [PATCH 09/11] fix(update-artifacts-file): env var --- actions/update-artifacts-file/README.md | 1 - actions/update-artifacts-file/action.yaml | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/actions/update-artifacts-file/README.md b/actions/update-artifacts-file/README.md index d26869b5..cab0e5e0 100644 --- a/actions/update-artifacts-file/README.md +++ b/actions/update-artifacts-file/README.md @@ -23,7 +23,6 @@ This GitHub Action builds and publishes a Helm chart to a specified registry and | `registry` | Registry URL the artifact is pushed to (e.g., ACR address) | ✅ Yes | | | `github_token` | GitHub token with permission to clone, commit & push to the target repo | ✅ Yes | | | `target_repo` | Target GitHub repo where `artifacts.json` should be updated (e.g. `org/repo`)| ❌ No | `mapcolonies/helm-charts` | -| `target_path` | Local path to clone the target repo into | ❌ No | `temp_helm_charts` | --- diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index 4cb8f938..c5feecb5 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -1,6 +1,9 @@ name: "Update Artifacts File" description: "An action to update the artifacts file in a different repository" +env: + TARGET_PATH: temp_helm_charts + inputs: domain: description: "Domain or namespace for the artifact." @@ -24,10 +27,6 @@ inputs: description: "Target GitHub repository" required: false default: "mapcolonies/helm-charts" - target_path: - description: "Local path to clone the target repo into" - required: false - default: "temp_helm_charts" runs: using: "composite" @@ -37,7 +36,7 @@ runs: with: repository: mapcolonies/helm-charts token: ${{ inputs.github_token }} - path: ${{ inputs.target_path }} + path: $TARGET_PATH - name: Set execute permission on modify script run: chmod +x actions/update-artifacts-file/modify_artifacts.sh @@ -52,7 +51,7 @@ runs: ARTIFACT_TAG: ${{ inputs.artifact_tag }} TYPE: ${{ inputs.type }} REGISTRY: ${{ inputs.registry }} - TARGET_DIR: ${{ inputs.target_path }} + TARGET_DIR: $TARGET_PATH - name: Set execute permission on commit script run: chmod +x actions/update-artifacts-file/commit_changes.sh @@ -68,8 +67,8 @@ runs: TYPE: ${{ inputs.type }} GITHUB_TOKEN: ${{ inputs.github_token }} TARGET_REPO: ${{ inputs.target_repo }} - TARGET_DIR: ${{ inputs.target_path }} + TARGET_DIR: $TARGET_PATH - name: Clean up target repo folder - run: rm -rf ${{ inputs.target_path }} + run: rm -rf $TARGET_PATH shell: bash From fb8eb7ea18966f8ae38473bdbba190d65434f2b9 Mon Sep 17 00:00:00 2001 From: michalby24 <55047068+michalby24@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:56:05 +0300 Subject: [PATCH 10/11] Update actions/update-artifacts-file/action.yaml Co-authored-by: Netanel Cohen <34451523+netanelC@users.noreply.github.com> --- actions/update-artifacts-file/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index c5feecb5..8b1ac023 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -34,7 +34,7 @@ runs: - name: Checkout helm chart repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: mapcolonies/helm-charts + repository: ${{ inputs.target_repo }} token: ${{ inputs.github_token }} path: $TARGET_PATH From 45fe28194be7fe3e215178b1bc97936429e8da44 Mon Sep 17 00:00:00 2001 From: michalby24 Date: Thu, 3 Jul 2025 15:59:48 +0300 Subject: [PATCH 11/11] fix(update-artifacts-file): temp_repo --- actions/update-artifacts-file/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index 8b1ac023..5f3bcb78 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -2,7 +2,7 @@ name: "Update Artifacts File" description: "An action to update the artifacts file in a different repository" env: - TARGET_PATH: temp_helm_charts + TARGET_PATH: temp_repo inputs: domain: