diff --git a/actions/update-artifacts-file/action.yaml b/actions/update-artifacts-file/action.yaml index 9936d85..a90b7a8 100644 --- a/actions/update-artifacts-file/action.yaml +++ b/actions/update-artifacts-file/action.yaml @@ -52,7 +52,7 @@ runs: ARTIFACT_TAG: ${{ inputs.artifact_tag }} TYPE: ${{ inputs.type }} REGISTRY: ${{ inputs.registry }} - TARGET_DIR: $TARGET_PATH + TARGET_PATH: $TARGET_PATH - name: Commit and push changes run: ${{ github.action_path }}/commit_changes.sh @@ -64,7 +64,7 @@ runs: TYPE: ${{ inputs.type }} GITHUB_TOKEN: ${{ inputs.github_token }} TARGET_REPO: ${{ inputs.target_repo }} - TARGET_DIR: $TARGET_PATH + TARGET_PATH: $TARGET_PATH TARGET_BRANCH: ${{ inputs.target_branch }} - name: Clean up target repo folder diff --git a/actions/update-artifacts-file/commit_changes.sh b/actions/update-artifacts-file/commit_changes.sh index 8316862..4cba889 100755 --- a/actions/update-artifacts-file/commit_changes.sh +++ b/actions/update-artifacts-file/commit_changes.sh @@ -1,11 +1,9 @@ #!/bin/bash -cd "$TARGET_DIR" +cd "$TARGET_PATH" git config user.name "mapcolonies[bot]" git config user.email "devops[bot]@mapcolonies.com" -git checkout "$TARGET_BRANCH" - 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" diff --git a/actions/update-artifacts-file/modify_artifacts.sh b/actions/update-artifacts-file/modify_artifacts.sh index 30919ca..a40ed93 100755 --- a/actions/update-artifacts-file/modify_artifacts.sh +++ b/actions/update-artifacts-file/modify_artifacts.sh @@ -1,5 +1,5 @@ #!/bin/bash -ARTIFACTS_PATH="$TARGET_DIR/$DOMAIN/artifacts.json" +ARTIFACTS_PATH="$TARGET_PATH/$DOMAIN/artifacts.json" # Make sure the directory exists mkdir -p "$(dirname "$ARTIFACTS_PATH")"