From c132ea940a5f01c5fb88010a744f9545c93cb00f Mon Sep 17 00:00:00 2001 From: Krzysztof Szyper <45788587+ChristophShyper@users.noreply.github.com> Date: Thu, 24 Feb 2022 09:10:20 +0100 Subject: [PATCH] Fix organization_domain input evaluation. Release v0.7 --- Makefile | 2 +- README.md | 4 ++-- action.yml | 2 +- entrypoint.sh | 11 +++-------- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 0ff23bf..bc99610 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ phony: help # Release tag for the action -VERSION := v0.6 +VERSION := v0.7 # GitHub Actions bogus variables GITHUB_REF ?= refs/heads/null diff --git a/README.md b/README.md index ab5685a..14a2967 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ jobs: run: | find . -type f -name "*" -print0 | xargs -0 sed -i "s/foo/bar/g" - name: Commit and push changes - uses: devops-infra/action-commit-push@v0.6 + uses: devops-infra/action-commit-push@v0.7 with: github_token: ${{ secrets.GITHUB_TOKEN }} commit_message: Replaced foo with bar @@ -101,7 +101,7 @@ jobs: run: | find . -type f -name "*" -print0 | xargs -0 sed -i "s/foo/bar/g" - name: Commit and push changes - uses: devops-infra/action-commit-push@v0.6 + uses: devops-infra/action-commit-push@v0.7 with: github_token: ${{ secrets.GITHUB_TOKEN }} commit_prefix: "[AUTO-COMMIT] foo/bar replace" diff --git a/action.yml b/action.yml index 468b410..98e25e0 100644 --- a/action.yml +++ b/action.yml @@ -37,7 +37,7 @@ outputs: description: Name of the branch code was pushed into runs: using: docker - image: docker://devopsinfra/action-commit-push:v0.6 + image: docker://devopsinfra/action-commit-push:v0.7 env: GITHUB_TOKEN: ${{ inputs.github_token }} branding: diff --git a/entrypoint.sh b/entrypoint.sh index 983ae12..c3dc1dd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,7 +10,7 @@ echo " commit_prefix: ${INPUT_COMMIT_PREFIX}" echo " commit_message: ${INPUT_COMMIT_MESSAGE}" echo " target_branch: ${INPUT_TARGET_BRANCH}" echo " add_timestamp: ${INPUT_ADD_TIMESTAMP}" -echo " organization_domain: ${INPUT_ORG_DOMAIN}" +echo " organization_domain: ${INPUT_ORGANIZATION_DOMAIN}" echo " force: ${INPUT_FORCE}" # Require github_token @@ -48,9 +48,9 @@ if [[ (-n "${INPUT_TARGET_BRANCH}" || "${INPUT_ADD_TIMESTAMP}" == "true") && -n fi # Set git credentials -git remote set-url origin "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${INPUT_ORG_DOMAIN}/${GITHUB_REPOSITORY}" +git remote set-url origin "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${INPUT_ORGANIZATION_DOMAIN}/${GITHUB_REPOSITORY}" git config --global user.name "${GITHUB_ACTOR}" -git config --global user.email "${GITHUB_ACTOR}@users.noreply.${INPUT_ORG_DOMAIN}" +git config --global user.email "${GITHUB_ACTOR}@users.noreply.${INPUT_ORGANIZATION_DOMAIN}" # Create an auto commit if [[ -n ${FILES_CHANGED} ]]; then @@ -63,11 +63,6 @@ if [[ -n ${FILES_CHANGED} ]]; then else git commit -am "Files changed:" -m "${FILES_CHANGED}" --allow-empty fi - if [[ "${INPUT_FORCE}" == "true" ]]; then - git push origin "${BRANCH}" --force - else - git push origin "${BRANCH}" - fi fi # Push