Check Futu OpenD Version Update #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow is used to check if there is a new version of Futu OpenD | |
# and update the version in the Dockerfile | |
name: Check Futu OpenD Version Update | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Check Futu OpenD Version | |
run: | | |
node script/check_version.js | |
- name: Commit and push | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add opend_version.json | |
if ! git diff --cached --quiet; then | |
git checkout -b update-futu-opend-version | |
git commit -m "Update Futu OpenD version" | |
git push --set-upstream origin update-futu-opend-version | |
# create a pull request | |
gh pr create --title "Update Futu OpenD version" --body "Update Futu OpenD version" | |
fi |