From 36d0852af7aaf1f2e623d7ac5fc7a835d96eabd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 02:53:47 +0000 Subject: [PATCH 01/13] Bump github.com/essentialkaos/ek/v12 in the all group Bumps the all group with 1 update: [github.com/essentialkaos/ek/v12](https://github.com/essentialkaos/ek). Updates `github.com/essentialkaos/ek/v12` from 12.127.0 to 12.128.0 - [Release notes](https://github.com/essentialkaos/ek/releases) - [Changelog](https://github.com/essentialkaos/ek/blob/master/CHANGELOG.md) - [Commits](https://github.com/essentialkaos/ek/compare/v12.127.0...v12.128.0) --- updated-dependencies: - dependency-name: github.com/essentialkaos/ek/v12 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4055afe..2ab8922 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/disintegration/imaging v1.6.2 - github.com/essentialkaos/ek/v12 v12.127.0 + github.com/essentialkaos/ek/v12 v12.128.0 ) require ( diff --git a/go.sum b/go.sum index 8f7fcea..e78dac7 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44am github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk= github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU= github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8= -github.com/essentialkaos/ek/v12 v12.127.0 h1:fU5A+QbIZ7NTq1K5jGVwAWwuLtBUhsIKuRWYT78hE+Q= -github.com/essentialkaos/ek/v12 v12.127.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw= +github.com/essentialkaos/ek/v12 v12.128.0 h1:vaBvqvYZtkBxmiYSMllYA6MRbNbiOXcxwKEVbZqxxLE= +github.com/essentialkaos/ek/v12 v12.128.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= From ceb8d23fecf7352e51873c2e4d40b927d755f4cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:17:07 +0000 Subject: [PATCH 02/13] Bump github.com/essentialkaos/ek/v12 in the all group Bumps the all group with 1 update: [github.com/essentialkaos/ek/v12](https://github.com/essentialkaos/ek). Updates `github.com/essentialkaos/ek/v12` from 12.128.0 to 12.129.0 - [Release notes](https://github.com/essentialkaos/ek/releases) - [Changelog](https://github.com/essentialkaos/ek/blob/master/CHANGELOG.md) - [Commits](https://github.com/essentialkaos/ek/compare/v12.128.0...v12.129.0) --- updated-dependencies: - dependency-name: github.com/essentialkaos/ek/v12 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2ab8922..829b716 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/disintegration/imaging v1.6.2 - github.com/essentialkaos/ek/v12 v12.128.0 + github.com/essentialkaos/ek/v12 v12.129.0 ) require ( diff --git a/go.sum b/go.sum index e78dac7..97e0a5a 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44am github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk= github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU= github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8= -github.com/essentialkaos/ek/v12 v12.128.0 h1:vaBvqvYZtkBxmiYSMllYA6MRbNbiOXcxwKEVbZqxxLE= -github.com/essentialkaos/ek/v12 v12.128.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw= +github.com/essentialkaos/ek/v12 v12.129.0 h1:ILbIifoOe3nZIP2ilRBZ/N/UyZUNCSGFGRnwb0Vb5WQ= +github.com/essentialkaos/ek/v12 v12.129.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= From 16a03161ad14c864a242030abead6b9768d49e58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 02:35:35 +0000 Subject: [PATCH 03/13] Bump github.com/essentialkaos/ek/v12 in the all group Bumps the all group with 1 update: [github.com/essentialkaos/ek/v12](https://github.com/essentialkaos/ek). Updates `github.com/essentialkaos/ek/v12` from 12.129.0 to 12.130.0 - [Release notes](https://github.com/essentialkaos/ek/releases) - [Changelog](https://github.com/essentialkaos/ek/blob/master/CHANGELOG.md) - [Commits](https://github.com/essentialkaos/ek/compare/v12.129.0...v12.130.0) --- updated-dependencies: - dependency-name: github.com/essentialkaos/ek/v12 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 829b716..955ef00 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,11 @@ go 1.18 require ( github.com/disintegration/imaging v1.6.2 - github.com/essentialkaos/ek/v12 v12.129.0 + github.com/essentialkaos/ek/v12 v12.130.0 ) require ( github.com/essentialkaos/depsy v1.3.0 // indirect golang.org/x/image v0.17.0 // indirect - golang.org/x/sys v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect ) diff --git a/go.sum b/go.sum index 97e0a5a..1136618 100644 --- a/go.sum +++ b/go.sum @@ -3,14 +3,14 @@ github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44am github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk= github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU= github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8= -github.com/essentialkaos/ek/v12 v12.129.0 h1:ILbIifoOe3nZIP2ilRBZ/N/UyZUNCSGFGRnwb0Vb5WQ= -github.com/essentialkaos/ek/v12 v12.129.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw= +github.com/essentialkaos/ek/v12 v12.130.0 h1:JhcjGZaBIEFfyNReHAHeTgldNv65ruHa9LR7YIVgmn0= +github.com/essentialkaos/ek/v12 v12.130.0/go.mod h1:yGof+LJIkWvQtGINs+2AGv/yeqcfj/brpQ9eYnzMzKs= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.17.0 h1:nTRVVdajgB8zCMZVsViyzhnMKPwYeroEERRC64JuLco= golang.org/x/image v0.17.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From aee78ba9e7b1d702d5d0c84caf1394c5c96d31fe Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:16:12 +0300 Subject: [PATCH 04/13] Improve Dependabot configuration --- .github/dependabot.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d0ad1de..605744a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,7 @@ updates: target-branch: "develop" schedule: interval: "daily" - timezone: "Europe/London" + timezone: "Etc/UTC" time: "03:00" labels: - "PR • MAINTENANCE" @@ -26,8 +26,8 @@ updates: target-branch: "develop" schedule: interval: "daily" - timezone: "Europe/London" - time: "04:00" + timezone: "Etc/UTC" + time: "03:00" labels: - "PR • MAINTENANCE" assignees: From bf92fcf2f12f90b09b965a4c5a3551c83045ec51 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:17:20 +0300 Subject: [PATCH 05/13] Improvements --- .codebeatsettings | 11 ----------- .github/workflows/ci.yml | 2 +- README.md | 3 +-- 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 .codebeatsettings diff --git a/.codebeatsettings b/.codebeatsettings deleted file mode 100644 index 8e5dd08..0000000 --- a/.codebeatsettings +++ /dev/null @@ -1,11 +0,0 @@ -{ - "GOLANG": { - "ABC": [15, 25, 50, 70], - "LOC": [30, 45, 70, 100], - "BLOCK_NESTING": [4, 6, 8, 10], - "TOO_MANY_IVARS": [50, 75, 100, 150], - "TOO_MANY_FUNCTIONS": [64, 128, 256, 512], - "TOTAL_LOC": [1500, 3000, 5000, 10000], - "TOTAL_COMPLEXITY": [350, 600, 900, 1200] - } -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13e4b2f..b1b9cb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: strategy: matrix: - go: [ '1.21.x', '1.22.x' ] + go: [ '1.22.x', '1.23.x' ] steps: - name: Checkout diff --git a/README.md b/README.md index 75af474..85bb643 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@

GitHub Actions CI Status - Codebeat badge GitHub Actions CodeQL Status

@@ -17,7 +16,7 @@ #### From source -To build the `rsz` from scratch, make sure you have a working Go 1.21+ workspace (_[instructions](https://go.dev/doc/install)_), then: +To build the `rsz` from scratch, make sure you have a working Go 1.22+ workspace (_[instructions](https://go.dev/doc/install)_), then: ``` go install github.com/essentialkaos/rsz@latest From 843faa3fda9448523e82baa33bfab44b27ff6f97 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:18:23 +0300 Subject: [PATCH 06/13] Dependencies update --- cli/cli.go | 30 +++++++++++++++--------------- go.mod | 8 ++++---- go.sum | 16 ++++++++++------ 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/cli/cli.go b/cli/cli.go index 5ed47ac..8affb40 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -14,21 +14,21 @@ import ( "strconv" "strings" - "github.com/essentialkaos/ek/v12/fmtc" - "github.com/essentialkaos/ek/v12/fmtutil" - "github.com/essentialkaos/ek/v12/fsutil" - "github.com/essentialkaos/ek/v12/options" - "github.com/essentialkaos/ek/v12/strutil" - "github.com/essentialkaos/ek/v12/support" - "github.com/essentialkaos/ek/v12/support/deps" - "github.com/essentialkaos/ek/v12/terminal" - "github.com/essentialkaos/ek/v12/terminal/tty" - "github.com/essentialkaos/ek/v12/usage" - "github.com/essentialkaos/ek/v12/usage/completion/bash" - "github.com/essentialkaos/ek/v12/usage/completion/fish" - "github.com/essentialkaos/ek/v12/usage/completion/zsh" - "github.com/essentialkaos/ek/v12/usage/man" - "github.com/essentialkaos/ek/v12/usage/update" + "github.com/essentialkaos/ek/v13/fmtc" + "github.com/essentialkaos/ek/v13/fmtutil" + "github.com/essentialkaos/ek/v13/fsutil" + "github.com/essentialkaos/ek/v13/options" + "github.com/essentialkaos/ek/v13/strutil" + "github.com/essentialkaos/ek/v13/support" + "github.com/essentialkaos/ek/v13/support/deps" + "github.com/essentialkaos/ek/v13/terminal" + "github.com/essentialkaos/ek/v13/terminal/tty" + "github.com/essentialkaos/ek/v13/usage" + "github.com/essentialkaos/ek/v13/usage/completion/bash" + "github.com/essentialkaos/ek/v13/usage/completion/fish" + "github.com/essentialkaos/ek/v13/usage/completion/zsh" + "github.com/essentialkaos/ek/v13/usage/man" + "github.com/essentialkaos/ek/v13/usage/update" "github.com/disintegration/imaging" ) diff --git a/go.mod b/go.mod index 955ef00..bb6a04b 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ module github.com/essentialkaos/rsz -go 1.18 +go 1.21 require ( github.com/disintegration/imaging v1.6.2 - github.com/essentialkaos/ek/v12 v12.130.0 + github.com/essentialkaos/ek/v13 v13.5.1 ) require ( github.com/essentialkaos/depsy v1.3.0 // indirect - golang.org/x/image v0.17.0 // indirect - golang.org/x/sys v0.22.0 // indirect + golang.org/x/image v0.20.0 // indirect + golang.org/x/sys v0.25.0 // indirect ) diff --git a/go.sum b/go.sum index 1136618..98bf5a1 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,20 @@ github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk= +github.com/essentialkaos/check v1.4.0/go.mod h1:LMKPZ2H+9PXe7Y2gEoKyVAwUqXVgx7KtgibfsHJPus0= github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU= github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8= -github.com/essentialkaos/ek/v12 v12.130.0 h1:JhcjGZaBIEFfyNReHAHeTgldNv65ruHa9LR7YIVgmn0= -github.com/essentialkaos/ek/v12 v12.130.0/go.mod h1:yGof+LJIkWvQtGINs+2AGv/yeqcfj/brpQ9eYnzMzKs= +github.com/essentialkaos/ek/v13 v13.5.1 h1:xkr3d5uAzs69AqI0oKHjjZIsowKdR117AMBv+Dop4Fk= +github.com/essentialkaos/ek/v13 v13.5.1/go.mod h1:KBOtJlrIC2etc/EXvMdbz1JeKmtkuVdK6uRW/ap0OPM= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.17.0 h1:nTRVVdajgB8zCMZVsViyzhnMKPwYeroEERRC64JuLco= -golang.org/x/image v0.17.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/image v0.20.0 h1:7cVCUjQwfL18gyBJOmYvptfSHS8Fb3YUDtfLIZ7Nbpw= +golang.org/x/image v0.20.0/go.mod h1:0a88To4CYVBAHp5FXJm8o7QbUl37Vd85ply1vyD8auM= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 947f4d641c31f3a204504a3ae5c3e3d2a3e79a6a Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:18:33 +0300 Subject: [PATCH 07/13] Regenerate Makefile with the latest version of gomakegen --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5cb9ed0..7938b26 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ################################################################################ -# This Makefile generated by GoMakeGen 3.0.2 using next command: +# This Makefile generated by GoMakeGen 3.2.0 using next command: # gomakegen --mod . # # More info: https://kaos.sh/gomakegen @@ -11,6 +11,16 @@ ifdef VERBOSE ## Print verbose information (Flag) VERBOSE_FLAG = -v endif +ifdef PROXY ## Force proxy usage for downloading dependencies (Flag) +export GOPROXY=https://proxy.golang.org/cached-only,direct +endif + +ifdef CGO ## Enable CGO usage (Flag) +export CGO_ENABLED=1 +else +export CGO_ENABLED=0 +endif + COMPAT ?= 1.19 MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD) @@ -107,8 +117,9 @@ help: ## Show this info @echo -e '\n\033[1mVariables:\033[0m\n' @grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \ | sed 's/ifdef //' \ + | sort -h \ | awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}' @echo -e '' - @echo -e '\033[90mGenerated by GoMakeGen 3.0.2\033[0m\n' + @echo -e '\033[90mGenerated by GoMakeGen 3.2.0\033[0m\n' ################################################################################ From d19633d33dd074cb0270d9b2877a170cd4532d3c Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:35:51 +0300 Subject: [PATCH 08/13] Improve CI workflow --- .docker/alpine.docker | 4 +- .../{docker-push.yml => cd-release.yml} | 12 ++-- .github/workflows/ci-pr.yml | 69 ++++++++++++++++++ .github/workflows/ci-push.yml | 26 +++++++ .github/workflows/ci.yml | 72 +------------------ 5 files changed, 103 insertions(+), 80 deletions(-) rename .github/workflows/{docker-push.yml => cd-release.yml} (96%) create mode 100644 .github/workflows/ci-pr.yml create mode 100644 .github/workflows/ci-push.yml diff --git a/.docker/alpine.docker b/.docker/alpine.docker index 11f8094..356c81e 100644 --- a/.docker/alpine.docker +++ b/.docker/alpine.docker @@ -4,7 +4,7 @@ ARG REGISTRY="docker.io" ## BUILDER ##################################################################### -FROM golang:alpine3.17 as builder +FROM golang:alpine3.20 as builder WORKDIR /go/src/github.com/essentialkaos/rsz @@ -15,7 +15,7 @@ RUN apk add --no-cache git make && make deps && make all ## FINAL IMAGE ################################################################# -FROM ${REGISTRY}/essentialkaos/alpine:3.17 +FROM ${REGISTRY}/essentialkaos/alpine:3.20 LABEL org.opencontainers.image.title="rsz" \ org.opencontainers.image.description="Simple utility for image resizing" \ diff --git a/.github/workflows/docker-push.yml b/.github/workflows/cd-release.yml similarity index 96% rename from .github/workflows/docker-push.yml rename to .github/workflows/cd-release.yml index 5980e6b..43539a0 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/cd-release.yml @@ -1,4 +1,4 @@ -name: "Docker Push" +name: CD (Release) on: release: @@ -19,15 +19,13 @@ permissions: env: IMAGE_NAME: ${{ github.repository }} + DOCKER_FILE: alpine jobs: - Docker: - name: Docker Build & Publish + BuildImage: + name: Image Build & Publish runs-on: ubuntu-latest - env: - DOCKER_FILE: alpine - steps: - name: Checkout uses: actions/checkout@v4 @@ -92,7 +90,7 @@ jobs: - name: Check if build/rebuild is required id: build_check run: | - if [[ "${{github.event_name}}" == "release" ]] ; then + if [[ "$GITHUB_EVENT_NAME" == "release" ]] ; then echo "build=true" >> $GITHUB_OUTPUT exit 0 fi diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml new file mode 100644 index 0000000..0624c2f --- /dev/null +++ b/.github/workflows/ci-pr.yml @@ -0,0 +1,69 @@ +name: CI (PR) + +on: + pull_request: + branches: [master] + workflow_dispatch: + inputs: + force_run: + description: 'Force workflow run' + required: true + type: choice + options: [yes, no] + +permissions: + actions: read + contents: read + statuses: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + CI: + uses: ./.github/workflows/ci.yml + secrets: inherit + + ImageBuild: + name: Container Image Build Check + runs-on: ubuntu-latest + + needs: CI + + env: + REGISTRY: ghcr.io + + strategy: + matrix: + image: [ 'alpine' ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: docker/login-action@v3 + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + if: ${{ env.DOCKERHUB_USERNAME != '' }} + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docker image + run: | + docker build --build-arg REGISTRY=${REGISTRY} -f .docker/${{matrix.image}}.docker -t ${{matrix.image}} . + + - name: Show info about built Docker image + uses: essentialkaos/docker-info-action@v1 + with: + image: ${{matrix.image}} + show-labels: true diff --git a/.github/workflows/ci-push.yml b/.github/workflows/ci-push.yml new file mode 100644 index 0000000..04d2363 --- /dev/null +++ b/.github/workflows/ci-push.yml @@ -0,0 +1,26 @@ +name: CI (Push) + +on: + push: + branches: [master, develop] + workflow_dispatch: + inputs: + force_run: + description: 'Force workflow run' + required: true + type: choice + options: [yes, no] + +permissions: + actions: read + contents: read + statuses: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + CI: + uses: ./.github/workflows/ci.yml + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1b9cb8..0db8855 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,27 +1,13 @@ name: CI on: - push: - branches: [master, develop] - pull_request: - branches: [master] - workflow_dispatch: - inputs: - force_run: - description: 'Force workflow run' - required: true - type: choice - options: [yes, no] + workflow_call: permissions: actions: read contents: read statuses: write -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - jobs: Go: name: Go @@ -74,59 +60,3 @@ jobs: - name: Check spelling continue-on-error: true uses: crate-ci/typos@master - - DockerBuild: - name: Docker Build Check - runs-on: ubuntu-latest - - needs: Hadolint - - env: - REGISTRY: ghcr.io - - strategy: - matrix: - image: [ 'alpine' ] - - steps: - - name: Check event type - run: | - if [[ "${{github.event_name}}" != "pull_request" ]] ; then - echo "::notice::Event type is not 'pull_request', all job actions will be skipped" - fi - - # This step is a hack for needs+if issue with actions - # More info about issue: https://github.com/actions/runner/issues/491 - - - name: Checkout - uses: actions/checkout@v4 - if: ${{ github.event_name == 'pull_request' }} - - - name: Login to DockerHub - uses: docker/login-action@v3 - env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - if: ${{ github.event_name == 'pull_request' && env.DOCKERHUB_USERNAME != '' }} - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'pull_request' }} - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Docker image - if: ${{ github.event_name == 'pull_request' }} - run: | - docker build --build-arg REGISTRY=${REGISTRY} -f .docker/${{matrix.image}}.docker -t ${{matrix.image}} . - - - name: Show info about built Docker image - uses: essentialkaos/docker-info-action@v1 - if: ${{ github.event_name == 'pull_request' }} - with: - image: ${{matrix.image}} - show-labels: true From ec883fefa42ee5b95b721911a6d5b7a9fbde6c9a Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:37:44 +0300 Subject: [PATCH 09/13] Bump version --- cli/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cli.go b/cli/cli.go index 8affb40..d382b42 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -38,7 +38,7 @@ import ( // Basic utility info const ( APP = "rsz" - VER = "0.1.1" + VER = "0.1.2" DESC = "Simple utility for image resizing" ) From 258178b6dabb2d49b456c82fb13705b886f4a5ce Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:39:39 +0300 Subject: [PATCH 10/13] New issue templates --- .github/ISSUE_TEMPLATE.md | 51 --------------------- .github/ISSUE_TEMPLATE/bug.yml | 64 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/question.yml | 26 +++++++++++ .github/ISSUE_TEMPLATE/suggestion.yml | 43 ++++++++++++++++++ cli/cli.go | 2 +- 6 files changed, 135 insertions(+), 52 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/question.yml create mode 100644 .github/ISSUE_TEMPLATE/suggestion.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index bb3bf50..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,51 +0,0 @@ -_Before opening an issue, search for similar bug reports or feature requests on GitHub Issues. If yes, please add a_ 👍 _reaction to the existing issue. If no similar issue can be found, fill out either the "Bug Report" or the "Feature Request" section below. Erase the other section and everything on and above this line._ - -### Bug report - -**System info:** - -* **Verbose version info (`rsz -vv`):** -* **Install tools:** - -**Steps to reproduce:** - -1. [First Step] -2. [Second Step] -3. [and so on...] - -**Expected behavior:** - -[What you expected to happen] - -**Actual behavior:** - -[What actually happened] - -**Additional info:** - -[Include gist of relevant config, logs, etc.] - -Please run those if possible and link them from a [gist](http://gist.github.com). - ---- - -### Feature Request - -Opening a feature request kicks off a discussion. Requests may be closed if we're not actively planning to work on them. - -**Proposal:** - -[Description of the feature] - -**Current behavior:** - -[What currently happens] - -**Desired behavior:** - -[What you would like to happen] - -**Use case:** - -[Why is this important (helps with prioritizing requests)] - diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..54b7524 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,64 @@ +name: ❗ Bug Report +description: File a bug report +title: "[Bug]: " +labels: ["issue • bug"] +assignees: + - andyone + +body: + - type: markdown + attributes: + value: | + > [!IMPORTANT] + > Before you open an issue, search GitHub Issues for a similar bug reports. If so, please add a 👍 reaction to the existing issue. + + - type: textarea + attributes: + label: Verbose application info + description: Output of `rsz -vv` command + render: shell + validations: + required: true + + - type: dropdown + id: version + attributes: + label: Install tools + description: How did you install this application + options: + - From Sources + - RPM Package + - Prebuilt Binary + default: 0 + validations: + required: true + + - type: textarea + attributes: + label: Steps to reproduce + description: Short guide on how to reproduce this problem on our site + placeholder: | + 1. [First Step] + 2. [Second Step] + 3. [and so on...] + validations: + required: true + + - type: textarea + attributes: + label: Expected behavior + description: What you expected to happen + validations: + required: true + + - type: textarea + attributes: + label: Actual behavior + description: What actually happened + validations: + required: true + + - type: textarea + attributes: + label: Additional info + description: Include gist of relevant config, logs, etc. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..3ef4409 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,26 @@ +name: ❓ Question +description: Question about application, configuration or code +title: "[Question]: " +labels: ["issue • question"] +assignees: + - andyone + +body: + - type: markdown + attributes: + value: | + > [!IMPORTANT] + > Before you open an issue, search GitHub Issues for a similar question. If so, please add a 👍 reaction to the existing issue. + + - type: textarea + attributes: + label: Question + description: Detailed question + validations: + required: true + + - type: textarea + attributes: + label: Related version application info + description: Output of `rsz -vv` command + render: shell diff --git a/.github/ISSUE_TEMPLATE/suggestion.yml b/.github/ISSUE_TEMPLATE/suggestion.yml new file mode 100644 index 0000000..39c69e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/suggestion.yml @@ -0,0 +1,43 @@ +name: ➕ Suggestion +description: Suggest new feature or improvement +title: "[Suggestion]: " +labels: ["issue • suggestion"] +assignees: + - andyone + +body: + - type: markdown + attributes: + value: | + > [!IMPORTANT] + > Before you open an issue, search GitHub Issues for a similar feature requests. If so, please add a 👍 reaction to the existing issue. + > + > Opening a feature request kicks off a discussion. Requests may be closed if we're not actively planning to work on them. + + - type: textarea + attributes: + label: Proposal + description: Description of the feature + validations: + required: true + + - type: textarea + attributes: + label: Current behavior + description: What currently happens + validations: + required: true + + - type: textarea + attributes: + label: Desired behavior + description: What you would like to happen + validations: + required: true + + - type: textarea + attributes: + label: Use case + description: Why is this important (helps with prioritizing requests) + validations: + required: true diff --git a/cli/cli.go b/cli/cli.go index d382b42..86aa674 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -38,7 +38,7 @@ import ( // Basic utility info const ( APP = "rsz" - VER = "0.1.2" + VER = "1.0.0" DESC = "Simple utility for image resizing" ) From 6ced9b55716b892f2dd9639fd8d93326ec258b1c Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 01:42:39 +0300 Subject: [PATCH 11/13] Improve dockerfile --- .docker/alpine.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/alpine.docker b/.docker/alpine.docker index 356c81e..689d613 100644 --- a/.docker/alpine.docker +++ b/.docker/alpine.docker @@ -4,14 +4,14 @@ ARG REGISTRY="docker.io" ## BUILDER ##################################################################### -FROM golang:alpine3.20 as builder +FROM ${REGISTRY}/essentialkaos/golang:alpine3.20 as builder WORKDIR /go/src/github.com/essentialkaos/rsz COPY . . # hadolint ignore=DL3018 -RUN apk add --no-cache git make && make deps && make all +RUN make deps && make all ## FINAL IMAGE ################################################################# From 46210e6862a3869ff0b1c7b7c13243761f240e02 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 02:18:54 +0300 Subject: [PATCH 12/13] Regenerate Makefile with the latest version of gomakegen --- Makefile | 5 ++--- go.mod | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7938b26..cb8abdc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ################################################################################ -# This Makefile generated by GoMakeGen 3.2.0 using next command: +# This Makefile generated by GoMakeGen 3.2.1 using next command: # gomakegen --mod . # # More info: https://kaos.sh/gomakegen @@ -21,7 +21,6 @@ else export CGO_ENABLED=0 endif -COMPAT ?= 1.19 MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD) @@ -120,6 +119,6 @@ help: ## Show this info | sort -h \ | awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}' @echo -e '' - @echo -e '\033[90mGenerated by GoMakeGen 3.2.0\033[0m\n' + @echo -e '\033[90mGenerated by GoMakeGen 3.2.1\033[0m\n' ################################################################################ diff --git a/go.mod b/go.mod index bb6a04b..93e9a8f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/essentialkaos/rsz -go 1.21 +go 1.22.7 require ( github.com/disintegration/imaging v1.6.2 From 3e7d0e22891469567e1b478b6e1c1c3385c3d06e Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Wed, 25 Sep 2024 02:21:39 +0300 Subject: [PATCH 13/13] Add codacy badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 85bb643..36afed3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@

+ Codacy GitHub Actions CI Status GitHub Actions CodeQL Status