更新 .gitea/workflows/deploy.yml
Some checks failed
Build and Deploy / deploy (push) Has been cancelled
Some checks failed
Build and Deploy / deploy (push) Has been cancelled
This commit is contained in:
parent
f45168f047
commit
997ccd867f
@ -1,5 +1,5 @@
|
||||
# 复制到仓库 .gitea/workflows/deploy.yml
|
||||
# 前置(仅一次): RUNNER_TOKEN=xxx ./scripts/19-setup-act-runner.sh
|
||||
# 前置(134): 24-setup-host-build.sh + 19-setup-act-runner.sh
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
@ -8,7 +8,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOCKERFILE: src/InterfaceForward.Api/Dockerfile
|
||||
CSPROJ: src/InterfaceForward.Api/InterfaceForward.Api.csproj
|
||||
IMAGE_NAME: interfaceforward_api
|
||||
DEPLOY_NAME: interfaceforward-api
|
||||
CONTAINER_NAME: interfaceforward-api
|
||||
@ -26,8 +26,11 @@ jobs:
|
||||
TAG="${{ gitea.sha }}"
|
||||
IMG="${{ env.TCR_REGISTRY }}/${{ env.TCR_NAMESPACE }}/${{ env.IMAGE_NAME }}:${TAG}"
|
||||
REPO="${{ gitea.repository }}"
|
||||
REPO="${REPO:-${{ github.repository }}}"
|
||||
test -n "$REPO" && [[ "$REPO" == */* ]]
|
||||
echo "REPO=$REPO TAG=$TAG host=$(hostname)"
|
||||
cd /data/k3s
|
||||
./scripts/ci-kaniko-build.sh "$REPO" "${{ env.DOCKERFILE }}" \
|
||||
./scripts/ci-publish-container.sh "$REPO" "${{ env.CSPROJ }}" \
|
||||
"${{ env.IMAGE_NAME }}" "$TAG" "$TAG"
|
||||
./scripts/ci-deploy-api.sh "${{ env.DEPLOY_NAME }}" \
|
||||
"${{ env.CONTAINER_NAME }}" "$IMG"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user