1
0
Fork 0

Automate workflow

master
Ambrose Chua 2020-05-16 14:29:53 +08:00
parent 0c69db71ee
commit 98b6c44cd0
2 changed files with 29 additions and 4 deletions

15
.github/workflows/bump_sdk.yml vendored Normal file
View File

@ -0,0 +1,15 @@
name: Bump Android SDK version
on:
schedule:
- cron: "12 0 * * *"
jobs:
bump_caddy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump and commit
run: ./bump-sdk-version

View File

@ -43,17 +43,27 @@ echo "+ Done!"
echo
echo "+ Adding changed files"
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add Dockerfile ndk/Dockerfile
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
echo "+ Committing"
git commit -a -m "Bump SDK version to $ANDROID_SDK_VERSION"
git commit -m "Bump SDK version to $ANDROID_SDK_VERSION"
echo "+ Tagging"
git tag $ANDROID_SDK_VERSION
git tag -f $ANDROID_SDK_VERSION
echo "+ Pushing"
git push
git push --tags
git push -f
git push --tags -f
echo "+ Done!"
fi