Skip to content

copy

copy #1002

Workflow file for this run

name: copy
on:
# push:
# paths-ignore:
# - '**.md'
# - .github/workflows/sync.yml
schedule:
- cron: '0 21 * * 0,1,3,5'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images:
- "gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/interceptors,docker.io/dyrnq/tektoncd-triggers-cmd-interceptors"
- "gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/controller,docker.io/dyrnq/tektoncd-triggers-cmd-controller"
- "gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/eventlistenersink,docker.io/dyrnq/tektoncd-triggers-cmd-eventlistenersink"
- "gcr.io/tekton-releases/github.com/tektoncd/triggers/cmd/webhook,docker.io/dyrnq/tektoncd-triggers-cmd-webhook"
- "gcr.io/tekton-releases/github.com/tektoncd/dashboard/cmd/dashboard,docker.io/dyrnq/tektoncd-dashboard-cmd-dashboard"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init,docker.io/dyrnq/tektoncd-pipeline-cmd-git-init"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/webhook,docker.io/dyrnq/tektoncd-pipeline-cmd-webhook"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/controller,docker.io/dyrnq/tektoncd-pipeline-cmd-controller"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/kubeconfigwriter,docker.io/dyrnq/tektoncd-pipeline-cmd-kubeconfigwriter"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/creds-init,docker.io/dyrnq/tektoncd-pipeline-cmd-creds-init"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/entrypoint,docker.io/dyrnq/tektoncd-pipeline-cmd-entrypoint"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/nop,docker.io/dyrnq/tektoncd-pipeline-cmd-nop"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/imagedigestexporter,docker.io/dyrnq/tektoncd-pipeline-cmd-imagedigestexporter"
- "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/pullrequest-init,docker.io/dyrnq/tektoncd-pipeline-cmd-pullrequest-init"
- "gcr.io/google.com/cloudsdktool/cloud-sdk,docker.io/dyrnq/cloud-sdk"
# - "ghcr.io/open-webui/open-webui,docker.io/dyrnq/open-webui"
# - "registry.k8s.io/sig-storage/nfs-subdir-external-provisioner,docker.io/dyrnq/nfs-subdir-external-provisioner"
# - "registry.k8s.io/sig-storage/local-volume-provisioner,docker.io/dyrnq/local-volume-provisioner"
# - "registry.k8s.io/sig-storage/snapshot-controller,docker.io/dyrnq/snapshot-controller"
# - "registry.k8s.io/sig-storage/csi-resizer,docker.io/dyrnq/csi-resizer"
# - "registry.k8s.io/sig-storage/csi-provisioner,docker.io/dyrnq/csi-provisioner"
# - "registry.k8s.io/sig-storage/csi-attacher,docker.io/dyrnq/csi-attacher"
# - "registry.k8s.io/sig-storage/csi-snapshotter,docker.io/dyrnq/csi-snapshotter"
# - "registry.k8s.io/sig-storage/nfsplugin,docker.io/dyrnq/nfsplugin"
# - "registry.k8s.io/sig-storage/livenessprobe,docker.io/dyrnq/livenessprobe"
# - "registry.k8s.io/sig-storage/csi-node-driver-registrar,docker.io/dyrnq/csi-node-driver-registrar"
# - "registry.k8s.io/sig-storage/csi-external-health-monitor-controller,docker.io/dyrnq/csi-external-health-monitor-controller"
# - "registry.k8s.io/sig-storage/snapshot-validation-webhook,docker.io/dyrnq/snapshot-validation-webhook"
# - "registry.k8s.io/dns/k8s-dns-node-cache,docker.io/dyrnq/k8s-dns-node-cache"
# - "registry.k8s.io/kube-apiserver,docker.io/dyrnq/kube-apiserver"
# - "registry.k8s.io/kube-controller-manager,docker.io/dyrnq/kube-controller-manager"
# - "registry.k8s.io/kube-scheduler,docker.io/dyrnq/kube-scheduler"
# - "registry.k8s.io/kube-proxy,docker.io/dyrnq/kube-proxy"
# - "registry.k8s.io/etcd,docker.io/dyrnq/etcd"
# - "registry.k8s.io/pause,docker.io/dyrnq/pause"
#- "registry.k8s.io/coredns/coredns,docker.io/dyrnq/coredns"
#- "registry.k8s.io/ingress-nginx/controller,docker.io/dyrnq/controller"
- "registry.k8s.io/ingress-nginx/controller,docker.io/dyrnq/ingress-nginx-controller"
#- "registry.k8s.io/ingress-nginx/kube-webhook-certgen,docker.io/dyrnq/kube-webhook-certgen"
- "cr.yandex/crp9ftr22d26age3hulg/yandex-cloud/csi-s3/csi-s3-driver,docker.io/dyrnq/csi-s3-driver"
# - "cr.yandex/crp9ftr22d26age3hulg/yandex-cloud/csi-s3/csi-provisioner,docker.io/dyrnq/csi-provisioner"
# - "cr.yandex/crp9ftr22d26age3hulg/yandex-cloud/csi-s3/csi-node-driver-registrar,docker.io/dyrnq/csi-node-driver-registrar"
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 copy
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
line=${{ matrix.images }}
echo ${line}
scr=$(awk -F, '{print $1}' <<< "${line}")
dest=$(awk -F, '{print $2}' <<< "${line}")
# desttags=$(skopeo list-tags --retry-times 5 docker://"${dest}" | jq -r '.Tags | @csv ')
for tag in $(skopeo list-tags docker://"${scr}" | jq -r '.Tags[]' | grep -v "sha" ) ; do
# skopeo --insecure-policy copy --all --retry-times 20 --dest-precompute-digests --dest-creds $DOCKER_USERNAME:$DOCKER_PASSWORD docker://"${scr}":"${tag}" docker://"${dest}":"${tag}"
schemaVersion=$(regctl manifest get docker://"${scr}":"${tag}" --format raw-body | jq -r '.schemaVersion')
if [ "${schemaVersion}" = "1" ]; then
echo "schemaVersion=1, skip copy"
else
skopeo --insecure-policy copy --all --retry-times 20 --dest-precompute-digests --dest-creds $DOCKER_USERNAME:$DOCKER_PASSWORD docker://"${scr}":"${tag}" docker://"${dest}":"${tag}"
fi
done
# skopeo --insecure-policy copy --all --retry-times 5 --dest-precompute-digests --dest-creds $DOCKER_USERNAME:$DOCKER_PASSWORD docker://gcr.io/google.com/cloudsdktool/cloud-sdk:302.0.0-slim docker://docker.io/dyrnq/cloud-sdk:302.0.0-slim
# skopeo --insecure-policy copy --all --retry-times 5 --dest-precompute-digests --dest-creds $DOCKER_USERNAME:$DOCKER_PASSWORD docker://gcr.io/distroless/base:debug docker://docker.io/dyrnq/distroless-base:debug