Skip to content

sync

sync #978

Workflow file for this run

name: sync
on:
# push:
# paths-ignore:
# - '**.md'
# - .github/workflows/copy.yml
schedule:
- cron: '0 20 * * 2,4,6'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images:
- |
registry.k8s.io:
images-by-tag-regex:
defaultbackend-amd64: ^(latest|v.*|\d+\..*)$
# - |
# registry.k8s.io:
# images-by-tag-regex:
# defaultbackend-arm64: ^(latest|v.*|\d+\..*)$
- |
registry.k8s.io:
images-by-tag-regex:
defaultbackend: ^(latest|v.*|\d+\..*)$
- |
registry.k8s.io:
images-by-tag-regex:
coredns/coredns: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
ingress-nginx/controller: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
ingress-nginx/kube-webhook-certgen: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
kube-state-metrics/kube-state-metrics: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/nfs-subdir-external-provisioner: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/local-volume-provisioner: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/snapshot-controller: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/csi-resizer: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/csi-provisioner: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/csi-attacher: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/csi-node-driver-registrar: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/csi-snapshotter: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/nfsplugin: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/livenessprobe: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/csi-external-health-monitor-controller: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
sig-storage/snapshot-validation-webhook: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
git-sync: ^(latest|v.*)$
- |
registry.k8s.io:
images-by-tag-regex:
pause: ^(latest|\d+\.\d+)$
- |
registry.k8s.io:
images-by-tag-regex:
etcd: ^(latest|v.*|\d+\..*)$
- |
registry.k8s.io:
images-by-tag-regex:
metrics-server/metrics-server: ^(latest|v.*)$
# - |
# registry.k8s.io:
# images-by-tag-regex:
# kube-apiserver: ^(latest|v1.(2[0-9]|[3-9][0-9]).*)$
# - |
# registry.k8s.io:
# images-by-tag-regex:
# kube-controller-manager: ^(latest|v1.(2[0-9]|[3-9][0-9]).*)$
# - |
# registry.k8s.io:
# images-by-tag-regex:
# kube-scheduler: ^(latest|v1.(2[0-9]|[3-9][0-9]).*)$
# - |
# registry.k8s.io:
# images-by-tag-regex:
# kube-proxy: ^(latest|v1.(2[0-9]|[3-9][0-9]).*)$
- |
registry.k8s.io:
images-by-tag-regex:
dns/k8s-dns-node-cache: ^(latest|v.*|\d+\..*)$
steps:
-
name: Checkout
uses: actions/checkout@v4
# -
# name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v1
# -
# name: Inspect builder
# run: |
# echo "Name: ${{ steps.buildx.outputs.name }}"
# echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
# echo "Status: ${{ steps.buildx.outputs.status }}"
# echo "Flags: ${{ steps.buildx.outputs.flags }}"
# echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
# -
# name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install ca-certificates curl jq libgpgme11
SKOPEO_VER=v1.15.1
sudo curl -# -fSL https://github.com/dyrnq/skopeo-binary/releases/download/${SKOPEO_VER}/skopeo.tar.xz | sudo tar -xvJ -C /usr/bin
sudo chmod +x /usr/bin/skopeo
skopeo -v && skopeo --help
- name: Install regctl
run: |
sudo curl -# -fSL -o /usr/local/bin/regctl https://github.com/regclient/regclient/releases/download/v0.7.1/regctl-linux-amd64
sudo chmod +x /usr/local/bin/regctl
regctl version
- name: Images sync
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
sync_tmp=$(mktemp "sync_XXXXX.yml" --tmpdir=/tmp/)
echo ${sync_tmp}
cat >${sync_tmp}<<EOF
${{ matrix.images }}
EOF
cat < ${sync_tmp}
skopeo --insecure-policy sync --keep-going --src yaml --all --dest-creds $DOCKER_USERNAME:$DOCKER_PASSWORD --dest docker ${sync_tmp} docker.io/dyrnq