diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh index 5158684..cd60431 100755 --- a/.github/scripts/update-version.sh +++ b/.github/scripts/update-version.sh @@ -1,13 +1,9 @@ if [ ! -z $(git diff --name-only HEAD HEAD~1 | grep build.gradle) ]; then new_version="$(git log -n1 --format=format:"%H")" sed --in-place "s!//version:.*!//version: $new_version!g" build.gradle - - git config user.email "johann.bernhardt@tum.de" - git config user.name "Github CI Worker" - git add build.gradle git commit -m "[ci skip] update build script version to $new_version" - git push + git push origin ${GITHUB_REF##*/} echo "Updated buildscript version to $new_version"; else echo "Ignored buildscript version update: no changes detected" diff --git a/.github/workflows/repository-specific.yml b/.github/workflows/repository-specific.yml index 958eceb..0780ad2 100644 --- a/.github/workflows/repository-specific.yml +++ b/.github/workflows/repository-specific.yml @@ -16,6 +16,10 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 2 + - name: setup git config + run: | + git config user.name "GitHub CI Bot" + git config user.email "<>" - name: Ensure build script version is up to date run: .github/scripts/update-version.sh diff --git a/build.gradle b/build.gradle index 696fda4..715ee07 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: commit hash placeholder; dummy changes to test automatic version update +//version: commit hash placeholder /* DO NOT CHANGE THIS FILE!