mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 03:32:33 +08:00
ci: fix
This commit is contained in:
parent
db4c658980
commit
fd10db3c75
24
.github/workflows/build-docker-image.yml
vendored
24
.github/workflows/build-docker-image.yml
vendored
|
@ -19,17 +19,27 @@ jobs:
|
||||||
export GITHUB_REF=${{ github.ref }}
|
export GITHUB_REF=${{ github.ref }}
|
||||||
echo $GITHUB_REF
|
echo $GITHUB_REF
|
||||||
fi
|
fi
|
||||||
- name: Check GITHUB_REF env
|
# - name: Check GITHUB_REF env
|
||||||
run: echo $GITHUB_REF
|
# run: echo $GITHUB_REF
|
||||||
- name: Get version # 在 GitHub Actions 运行环境
|
# - name: Get version # 在 GitHub Actions 运行环境
|
||||||
id: get_version
|
# id: get_version
|
||||||
if: (startsWith(env.GITHUB_REF, 'refs/tags/')||startsWith(github.ref, 'refs/tags/')) && startsWith(github.repository, 'RockChinQ/QChatGPT')
|
# if: (startsWith(env.GITHUB_REF, 'refs/tags/')||startsWith(github.ref, 'refs/tags/')) && startsWith(github.repository, 'RockChinQ/QChatGPT')
|
||||||
run: export GITHUB_REF=${GITHUB_REF/refs\/tags\//}
|
# run: export GITHUB_REF=${GITHUB_REF/refs\/tags\//}
|
||||||
- name: Check version
|
- name: Check version
|
||||||
id: check_version
|
id: check_version
|
||||||
run: |
|
run: |
|
||||||
echo $GITHUB_REF
|
echo $GITHUB_REF
|
||||||
echo ::set-output name=version::${GITHUB_REF}
|
# 如果是tag,则去掉refs/tags/前缀
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
echo "It's a tag"
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo $GITHUB_REF | awk -F '/' '{print $3}'
|
||||||
|
echo ::set-output name=version::$(echo $GITHUB_REF | awk -F '/' '{print $3}')
|
||||||
|
else
|
||||||
|
echo "It's not a tag"
|
||||||
|
echo $GITHUB_REF
|
||||||
|
echo ::set-output name=version::${GITHUB_REF}
|
||||||
|
fi
|
||||||
- name: Login to Registry
|
- name: Login to Registry
|
||||||
run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
|
run: docker login --username=${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: Create Buildx
|
- name: Create Buildx
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user