From 9fafa6dc05d4325d42e9f884d002348bf1468273 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 24 Oct 2026 14:58:32 +0000 Subject: [PATCH] chore: Add restyler mirror to toktok github. --- .github/workflows/restyler-mirror.yml | 34 +++++++++++++++++++++++++++ .restyled.yaml | 12 ++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/restyler-mirror.yml diff --git a/.github/workflows/restyler-mirror.yml b/.github/workflows/restyler-mirror.yml new file mode 100644 index 0000000..61343a7 --- /dev/null +++ b/.github/workflows/restyler-mirror.yml @@ -0,0 +1,34 @@ +name: restyler-mirror + +on: + workflow_dispatch: + +permissions: + packages: write + +jobs: + mirror: + runs-on: ubuntu-latest + env: + SRC: public.ecr.aws/restyled-io + DST: ghcr.io/toktok + steps: + - name: Log in to GHCR + run: echo '${{ github.token }}' | docker login ghcr.io -u '${{ github.actor }}' --password-stdin + - name: Mirror images + run: | + set -eu + for img in \ + restyler-astyle:v3.6.2 \ + restyler-autopep8:v2.3.2 \ + restyler-black:v26.10.1 \ + restyler-clang-format:v16.0.6 \ + restyler-prettier:v3.9.10-6 \ + restyler-reorder-python-imports:v3.19.0 \ + restyler-shellharden:v4.3.2 \ + restyler-shfmt:v3.14.1 \ + restyler-yapf:v0.43.0-1; do + for i in 1 2 3 4 5; do docker pull "$SRC/$img" && break; sleep 15; done + docker tag "$SRC/$img" "$DST/$img" + docker push "$DST/$img" + done diff --git a/.restyled.yaml b/.restyled.yaml index 806dc76..7564682 100644 --- a/.restyled.yaml +++ b/.restyled.yaml @@ -11,4 +11,16 @@ restylers: # Conflicts with "black" - yapf: enabled: false + - autopep8: + image: ghcr.io/toktok/restyler-autopep8:v2.3.2 + - black: + image: ghcr.io/toktok/restyler-black:v26.10.1 + - prettier-markdown: + image: ghcr.io/toktok/restyler-prettier:v3.9.10-6 + - prettier-yaml: + image: ghcr.io/toktok/restyler-prettier:v3.9.10-6 + - shellharden: + image: ghcr.io/toktok/restyler-shellharden:v4.3.2 + - shfmt: + image: ghcr.io/toktok/restyler-shfmt:v3.14.1 - "*"