Browse Source

Automate workflow

master
Ambrose Chua 11 months ago
parent
commit
98b6c44cd0
  1. 15
      .github/workflows/bump_sdk.yml
  2. 18
      bump-sdk-version

15
.github/workflows/bump_sdk.yml

@ -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

18
bump-sdk-version

@ -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
Loading…
Cancel
Save