diff --git a/.github/workflows/check-client-version.yml b/.github/workflows/check-client-version.yml new file mode 100644 index 0000000..2befd3e --- /dev/null +++ b/.github/workflows/check-client-version.yml @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8133efc..4b16d99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 diff --git a/VERSION b/VERSION index 0f1acbd..efdb8b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.1.2 +v1.1.2 \ No newline at end of file