mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-18 11:29:22 +00:00
ci: configure git in separate step; specify current branch when pushing new builscript version
This commit is contained in:
1 parent
b6408ca471
commit
61028b6cf1
3 files changed
+6
-6
No files matched your search
@@ -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 "[email protected]"
|
||||
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"
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
//version: commit hash placeholder; dummy changes to test automatic version update
|
||||
//version: commit hash placeholder
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
|
||||
|
||||
Reference in new issue
Block a user