Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

perf: 优化构建 #34

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/check-client-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
schedule:
- cron: '0 1 * * *'

name: Client for Latest Release Version

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: dev

- name: Check Client Version
run: |
version=$(curl -s https://api.github.com/repos/jumpserver/clients/releases/latest | jq -r .tag_name)
echo "version=${version}" >> $GITHUB_ENV
sed -i "s/Client_VERSION=.*/Client_VERSION=${version}/g" prepare.sh
git diff --exit-code || echo "need_update=1" >> $GITHUB_ENV
git checkout -b pr@dev@upgrade_client_${version}

- 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 Client Version to ${{ env.version }}"
git push origin pr@dev@upgrade_client_${{ env.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to FIT2CLOUD Container Registry
uses: docker/login-action@v3
with:
registry: registry.fit2cloud.com
username: ${{ secrets.FIT2CLOUD_USERNAME }}
password: ${{ secrets.FIT2CLOUD_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -49,6 +56,7 @@ jobs:
tags: |
jumpserver/web-static:${{ steps.get-version.outputs.version }}
ghcr.io/jumpserver/web-static:${{ steps.get-version.outputs.version }}
registry.fit2cloud.com/jumpserver/web-static:${{ steps.get-version.outputs.version }}
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.2
v1.1.2
Loading