Files
my-docs/.github/workflows/buidl_and_push_ghcr.yml
Workflow config file is invalid. Please check your config file: yaml: line 2: mapping values are not allowed in this context

23 lines
982 B
YAML

- name: Build and Push (Hardcoded Host)
uses: docker://gcr.io/kaniko-project/executor:v1.23.2-debug
with:
entrypoint: /busybox/sh
args: >-
-c
"
# 直接填入你的内部域名,避免任何 Shell 解析问题
SAFE_HOST='gitea-http.gitea.svc.cluster.local:3000'
echo \"Using Host: \$SAFE_HOST\"
echo \"{\\\"auths\\\":{\\\"\$SAFE_HOST\\\":{\\\"username\\\":\\\"${{ gitea.actor }}\\\",\\\"password\\\":\\\"${{ secrets.GITHUB_TOKEN }}\\\"}}}\" > /kaniko/.docker/config.json
/kaniko/executor \
--context=. \
--dockerfile=Dockerfile \
--destination=\$SAFE_HOST/${{ gitea.actor }}/my-docs:latest \
--destination=\$SAFE_HOST/${{ gitea.actor }}/my-docs:${{ github.sha }} \
--insecure \
--skip-tls-verify \
--cache=true
"