From f0994da150d109f09eee1d05072a2f97ae4c96f4 Mon Sep 17 00:00:00 2001 From: ds Date: Thu, 15 May 2025 23:26:49 +0300 Subject: [PATCH 1/3] fix module url --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 23db792..45cc81f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module gitlab.com/gitlab-org/docker-distribution-pruner +module github.com/doc-sheet/docker-distribution-pruner go 1.22.0 From 5dd13f5af36b74f9f5467aec33daa53746292c77 Mon Sep 17 00:00:00 2001 From: ds Date: Thu, 15 May 2025 23:29:04 +0300 Subject: [PATCH 2/3] update go versions matrix --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 76 ----------------------------- .github/workflows/upstream-sync.yml | 47 ------------------ 3 files changed, 1 insertion(+), 124 deletions(-) delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/upstream-sync.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40b4f85..e629f9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - go: ["1.20", "1.21", "1.22"] + go: ["1.22", "1.23", "1.24"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 1d1d5c3..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,76 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "master" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - schedule: - - cron: '40 17 * * 5' - -jobs: - analyze: - name: Analyze - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'go' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/upstream-sync.yml b/.github/workflows/upstream-sync.yml deleted file mode 100644 index 3b874bc..0000000 --- a/.github/workflows/upstream-sync.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: Sync - -on: - schedule: - - cron: "17 12 * * *" - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -jobs: - sync: - runs-on: ubuntu-latest - strategy: - matrix: - branch: - - master - - env: - upstream: https://gitlab.com/gitlab-org/docker-distribution-pruner.git - GH_TOKEN: ${{ github.token }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - - - name: Create target branch if missing - run: | - git checkout -b upstream-${{ matrix.branch }} \ - && git push origin upstream-${{ matrix.branch }} || : - - - name: Fetch branch latest - shell: bash - run: | - git remote add upstream ${{ env.upstream }} - git remote -v - git fetch upstream ${{ matrix.branch }} - git rebase --autosquash --autostash upstream/${{ matrix.branch }} - git push --force origin upstream-${{ matrix.branch }} - - gh pr create \ - --title "Sync upstream branch ${{ matrix.branch }}" \ - --fill-verbose \ - --base "${{ matrix.branch }}" || : From 2b8b55a149456a5d3e649019c7472ac975db0cd1 Mon Sep 17 00:00:00 2001 From: ds Date: Thu, 15 May 2025 23:35:08 +0300 Subject: [PATCH 3/3] fix logrus case --- experimental/blobs.go | 2 +- experimental/deletes.go | 2 +- experimental/main.go | 2 +- experimental/manifest.go | 2 +- experimental/repositories.go | 2 +- experimental/repository.go | 2 +- experimental/s3_storage.go | 2 +- experimental/tag.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/experimental/blobs.go b/experimental/blobs.go index 0be0f74..54b41ec 100644 --- a/experimental/blobs.go +++ b/experimental/blobs.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" "github.com/dustin/go-humanize" ) diff --git a/experimental/deletes.go b/experimental/deletes.go index fedb487..57bbdc8 100644 --- a/experimental/deletes.go +++ b/experimental/deletes.go @@ -4,7 +4,7 @@ import ( "path/filepath" "sync/atomic" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" "github.com/dustin/go-humanize" ) diff --git a/experimental/main.go b/experimental/main.go index aeb691a..b8c0c38 100644 --- a/experimental/main.go +++ b/experimental/main.go @@ -6,7 +6,7 @@ import ( "os/signal" "sync" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" ) var ( diff --git a/experimental/manifest.go b/experimental/manifest.go index f9a20c4..18cdcd8 100644 --- a/experimental/manifest.go +++ b/experimental/manifest.go @@ -6,7 +6,7 @@ import ( "path/filepath" "sync" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" "github.com/docker/distribution" "github.com/docker/distribution/manifest" "github.com/docker/distribution/manifest/manifestlist" diff --git a/experimental/repositories.go b/experimental/repositories.go index 643d98a..37da6a5 100644 --- a/experimental/repositories.go +++ b/experimental/repositories.go @@ -7,7 +7,7 @@ import ( "strings" "sync" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" ) type repositoriesData map[string]*repositoryData diff --git a/experimental/repository.go b/experimental/repository.go index 4729c2c..8c237d5 100644 --- a/experimental/repository.go +++ b/experimental/repository.go @@ -9,7 +9,7 @@ import ( multierror "github.com/hashicorp/go-multierror" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" "github.com/dustin/go-humanize" ) diff --git a/experimental/s3_storage.go b/experimental/s3_storage.go index 5d658e6..dc60afc 100644 --- a/experimental/s3_storage.go +++ b/experimental/s3_storage.go @@ -8,7 +8,7 @@ import ( "strings" "sync/atomic" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" diff --git a/experimental/tag.go b/experimental/tag.go index bbdec23..3e01a0b 100644 --- a/experimental/tag.go +++ b/experimental/tag.go @@ -4,7 +4,7 @@ import ( "path/filepath" "sync" - "github.com/sirupsen/logrus" + "github.com/Sirupsen/logrus" ) type tagData struct {