Skip to content

Commit

Permalink
perf: auto change version
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Aug 21, 2024
1 parent 8921184 commit 08c6cbc
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/check-deps-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
schedule:
- cron: '0 1 * * *'

name: Check Dependencies Versions

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
branch: [dev]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}

- name: Check client version
run: |
version=$(curl -s https://api.github.com/repos/jumpserver/clients/releases/latest | jq -r .tag_name)
sed -i "s/Client_VERSION=.*/Client_VERSION=${version}/g" versions.txt
- name: Check player version
run: |
version=$(curl -s https://api.github.com/repos/jumpserver/VideoPlayer/releases/latest | jq -r .tag_name)
echo "version=${version}" >> $GITHUB_ENV
sed -i "s/VIDEO_PLAYER_VERSION=.*/VIDEO_PLAYER_VERSION=${version}/g" versions.txt
- name: Check tinker version
run: |
version=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/jumpserver/tinker/releases/latest | jq -r .tag_name)
sed -i "s/TINKER_VERSION=.*/TINKER_VERSION=${version}/g" versions.txt
- name: Need update
run: |
need_update=0
if [ -n "$(git status --porcelain)" ]; then
need_update=1
fi
echo "need_update=${need_update}" >> $GITHUB_ENV
- name: Update Client Version
if: env.need_update == '1'
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit -m "Update pkg versions"
git push origin pr@${{ matrix.branch }}@upgrade_client
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# 更改这些版本号,目前需要同步修改 https://github.com/jumpserver/jumpserver/blob/dev/apps/jumpserver/views/other.py#L99
PLAY_VERSION=1.1.0-1
PYTHON_VERSION=3.11.6
CHROME_VERSION=118.0.5993.118
Expand All @@ -6,6 +7,6 @@ DBEAVER_VERSION=22.3.4
MRD_VERSION=10.6.7
OPENSSH_VERSION=v9.4.0.0
MONGOSH_VERSION=2.2.12
TINKER_VERSION=v0.1.7
VIDEO_PLAYER_VERSION=0.1.9
TINKER_VERSION=null
VIDEO_PLAYER_VERSION=v0.1.9
CLIENT_VERSION=v2.1.3

0 comments on commit 08c6cbc

Please sign in to comment.