fix: push via internal Gitea HTTP registry with insecure-registries
This commit is contained in:
@@ -12,6 +12,8 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GITEA_REGISTRY: gitea-http.gitea.svc.cluster.local:3000
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
@@ -29,29 +31,17 @@ jobs:
|
|||||||
docker buildx create --use --driver docker-container --name builder 2>/dev/null || true
|
docker buildx create --use --driver docker-container --name builder 2>/dev/null || true
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Build image (multi-arch, export to daemon)
|
- name: Login to internal Gitea Container Registry
|
||||||
run: |
|
run: |
|
||||||
|
echo "${{ secrets.CHECKOUT_TOKEN }}" | \
|
||||||
|
docker login "${GITEA_REGISTRY}" -u luochen570 --password-stdin
|
||||||
|
|
||||||
|
- name: Build and push (multi-arch, via internal registry)
|
||||||
|
run: |
|
||||||
|
TAG_WEEKLY="weekly-$(date +%Y%m%d)"
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
--load \
|
--push \
|
||||||
-t luochen570-cli:latest \
|
-t "${GITEA_REGISTRY}/luochen570/luochen570-cli:latest" \
|
||||||
|
-t "${GITEA_REGISTRY}/luochen570/luochen570-cli:${TAG_WEEKLY}" \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Install skopeo
|
|
||||||
run: |
|
|
||||||
apt-get update -qq && apt-get install -y -qq skopeo
|
|
||||||
|
|
||||||
- name: Push to Gitea internal registry (via skopeo, bypass Traefik)
|
|
||||||
run: |
|
|
||||||
GITEA_INTERNAL="gitea-http.gitea.svc.cluster.local:3000"
|
|
||||||
TAG_WEEKLY="weekly-$(date +%Y%m%d)"
|
|
||||||
skopeo copy \
|
|
||||||
docker-daemon:luochen570-cli:latest \
|
|
||||||
"docker://${GITEA_INTERNAL}/luochen570/luochen570-cli:latest" \
|
|
||||||
--dest-creds="luochen570:${{ secrets.CHECKOUT_TOKEN }}" \
|
|
||||||
--dest-tls-verify=false
|
|
||||||
skopeo copy \
|
|
||||||
docker-daemon:luochen570-cli:latest \
|
|
||||||
"docker://${GITEA_INTERNAL}/luochen570/luochen570-cli:${TAG_WEEKLY}" \
|
|
||||||
--dest-creds="luochen570:${{ secrets.CHECKOUT_TOKEN }}" \
|
|
||||||
--dest-tls-verify=false
|
|
||||||
|
|||||||
Reference in New Issue
Block a user