This commit is contained in:
@@ -13,17 +13,17 @@ jobs:
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY_ADDR }} # 要上传的仓库地址: gitea.guetsec.cn
|
||||
username: ${{ secrets.REGISTRY_USERNAME }} # Gitea 用户名
|
||||
password: ${{ secrets.REGISTRY_TOKEN }} # Gitea 有package读写权限的访问令牌
|
||||
# Gitea 使用:gitea.registry
|
||||
registry: ${{ gitea.registry }}
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
# 设置动态标签
|
||||
# 设置动态标签(Gitea 语法)
|
||||
- name: Set image tags
|
||||
id: tags
|
||||
run: |
|
||||
SHORT_SHA=$(echo ${GITEA_SHA} | cut -c1-8)
|
||||
echo "tags=${{ vars.REGISTRY_ADDR }}/${{ gitea.repository }}:${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
echo "tags=${{ vars.REGISTRY_ADDR }}/${{ gitea.repository }}:latest" >> $GITHUB_OUTPUT
|
||||
echo "::set-output name=tags::${{ gitea.registry }}/${{ gitea.repository }}:${SHORT_SHA},${{ gitea.registry }}/${{ gitea.repository }}:latest"
|
||||
|
||||
# 构建并推送
|
||||
- name: Build and push
|
||||
|
||||
Reference in New Issue
Block a user