gitea workflow: push to IPCR's direct host (Cloudflare 100 MB cap) [skip ci]
This commit is contained in:
@@ -2,9 +2,14 @@
|
|||||||
# folder exists, and GitHub never reads it.
|
# folder exists, and GitHub never reads it.
|
||||||
#
|
#
|
||||||
# Publishes to IPCR on watch.nsl.sh instead of ghcr.io:
|
# Publishes to IPCR on watch.nsl.sh instead of ghcr.io:
|
||||||
# push ipcr-push-watch.nsl.sh/metadec.eth/<repo>:<tag> docker login as metadec.eth with the
|
# push ipcr-push-85-17-246-67.nip.io/metadec.eth/<repo>:<tag> docker login as metadec.eth with the
|
||||||
# IPCR_PUSH_TOKEN secret (the metadec.eth namespace token from the IPCR dashboard)
|
# IPCR_PUSH_TOKEN secret (the metadec.eth namespace token from the IPCR dashboard)
|
||||||
# pull ipcr-watch.nsl.sh/ipns/metadec.eth/metadec.eth/<repo>:<tag> anonymous
|
# pull ipcr-watch.nsl.sh/ipns/metadec.eth/metadec.eth/<repo>:<tag> anonymous
|
||||||
|
# The push goes to ipcr-push-85-17-246-67.nip.io, the box's own address, not ipcr-push-watch.nsl.sh: Cloudflare fronts
|
||||||
|
# *.watch.nsl.sh and refuses any request over 100 MB (413), which a large image layer is.
|
||||||
|
# That host's certificate is signed by the box's private Mesh Router CA, given to buildkit from
|
||||||
|
# the IPCR_CA_PEM repo variable. docker login would make the job's Docker daemon check the
|
||||||
|
# certificate without that CA, so the login is written straight into ~/.docker/config.json.
|
||||||
# The runner's job image (node:22-bookworm) has no docker CLI, so the static one is
|
# The runner's job image (node:22-bookworm) has no docker CLI, so the static one is
|
||||||
# installed first; buildx installs itself. No `type=gha` cache: the runner has none.
|
# installed first; buildx installs itself. No `type=gha` cache: the runner has none.
|
||||||
|
|
||||||
@@ -24,7 +29,7 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ipcr-push-watch.nsl.sh
|
REGISTRY: ipcr-push-85-17-246-67.nip.io
|
||||||
IMAGE_NAME: metadec.eth/${{ github.event.repository.name }}
|
IMAGE_NAME: metadec.eth/${{ github.event.repository.name }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -41,17 +46,25 @@ jobs:
|
|||||||
- name: Install Docker CLI
|
- name: Install Docker CLI
|
||||||
run: curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-28.5.1.tgz | tar -xz -C /usr/local/bin --strip-components=1 docker/docker
|
run: curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-28.5.1.tgz | tar -xz -C /usr/local/bin --strip-components=1 docker/docker
|
||||||
|
|
||||||
|
- name: Trust the Mesh Router CA
|
||||||
|
run: printf '%s\n' "$IPCR_CA_PEM" > /tmp/ipcr-ca.pem
|
||||||
|
env:
|
||||||
|
IPCR_CA_PEM: ${{ vars.IPCR_CA_PEM }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
buildkitd-config-inline: |
|
||||||
|
[registry."${{ env.REGISTRY }}"]
|
||||||
|
ca = ["/tmp/ipcr-ca.pem"]
|
||||||
|
|
||||||
- name: Log in to IPCR
|
- name: Log in to IPCR
|
||||||
uses: docker/login-action@v3
|
env:
|
||||||
with:
|
IPCR_PUSH_TOKEN: ${{ secrets.IPCR_PUSH_TOKEN }}
|
||||||
registry: ${{ env.REGISTRY }}
|
run: |
|
||||||
username: metadec.eth
|
mkdir -p ~/.docker
|
||||||
password: ${{ secrets.IPCR_PUSH_TOKEN }}
|
printf '{"auths":{"%s":{"auth":"%s"}}}\n' "$REGISTRY" "$(printf 'metadec.eth:%s' "$IPCR_PUSH_TOKEN" | base64 -w0)" > ~/.docker/config.json
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels)
|
- name: Extract metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
|
|||||||
Reference in New Issue
Block a user