From 85d32d00e1bfa142abce25a74a97e5f92ea00b8c Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 28 May 2023 20:06:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=20latest?= =?UTF-8?q?=20=E9=95=9C=E5=83=8F=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_docker_image.yml | 7 ++++--- shell/update.sh | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index 7cb792d0..1e1ebb0c 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -85,8 +85,6 @@ jobs: git push --force --quiet gitlab ${GITHUB_BRANCH}:${GITHUB_BRANCH} build: - if: github.ref != 'refs/heads/master' - needs: build-static runs-on: ubuntu-latest @@ -131,11 +129,14 @@ jobs: ghcr.io/${{ github.repository }} # generate Docker tags based on the following events/attributes # nightly, master, pr-2, 1.2.3, 1.2, 1 + flavor: | + latest=false tags: | type=schedule,pattern=nightly type=edge - type=ref,event=branch type=ref,event=pr + type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} diff --git a/shell/update.sh b/shell/update.sh index 94a82822..bfb6678d 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -243,10 +243,9 @@ update_qinglong() { echo -e "使用 ${mirror} 源更新...\n" export isFirstStartServer=false - local all_branch=$(cd ${dir_root} && git branch -a) local primary_branch="master" - if [[ "${all_branch}" =~ "${current_branch}" ]]; then - primary_branch="${current_branch}" + if [[ "${QL_BRANCH}" == "develop" ]]; then + primary_branch="develop" fi [[ -f $dir_root/package.json ]] && ql_depend_old=$(cat $dir_root/package.json) reset_romote_url ${dir_root} "https://${mirror}.com/whyour/qinglong.git" ${primary_branch}