-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
508 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
# don't run this on the master branch | ||
if: github.ref != 'refs/heads/master' | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/[email protected] | ||
- uses: pre-commit/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
steps: | ||
|
||
- name: Setup Node.js for use with actions | ||
uses: actions/setup-node@v2.1.5 | ||
uses: actions/setup-node@v2.4.0 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -27,18 +27,18 @@ jobs: | |
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ^1.15.0 | ||
go-version: ^1.16.5 | ||
id: go | ||
|
||
- name: Login to github registry | ||
uses: docker/login-action@v1.9.0 | ||
uses: docker/login-action@v1.10.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.CR_PAT }} | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2.6.1 | ||
uses: goreleaser/goreleaser-action@v2.7.0 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ^1.15.0 | ||
go-version: ^1.16.5 | ||
id: go | ||
|
||
- name: Checkout | ||
|
@@ -42,7 +42,7 @@ jobs: | |
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ^1.15.0 | ||
go-version: ^1.16.5 | ||
id: go | ||
|
||
- name: Checkout | ||
|
@@ -85,7 +85,7 @@ jobs: | |
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ^1.15.0 | ||
go-version: ^1.16.5 | ||
id: go | ||
|
||
- uses: actions/cache@v2 | ||
|
@@ -100,7 +100,7 @@ jobs: | |
${{ runner.os }}-go- | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2.6.1 | ||
uses: goreleaser/goreleaser-action@v2.7.0 | ||
with: | ||
version: latest | ||
args: release --rm-dist --skip-validate --skip-publish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,6 @@ changelog: | |
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^chore:' | ||
|
||
archives: | ||
- format: binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SOURCE_FILES?=./... | ||
TEST_PATTERN?=. | ||
TEST_OPTIONS?= | ||
|
||
.PHONY: help $(MAKECMDGOALS) | ||
.DEFAULT_GOAL := help | ||
|
||
export GO111MODULE := on | ||
export GOPROXY = https://proxy.golang.org,direct | ||
|
||
help: ## List targets & descriptions | ||
@cat Makefile* | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
setup: ## Install dependencies | ||
go mod download | ||
go mod tidy | ||
|
||
test: ## Run tests | ||
LC_ALL=C go test $(TEST_OPTIONS) -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=5m | ||
|
||
cover: test ## Run tests and open coverage report | ||
go tool cover -html=coverage.txt | ||
|
||
fmt: ## gofmt and goimports all go files | ||
gofmt -l -w . | ||
goimports -l -w . | ||
|
||
lint: ## Run linters | ||
golangci-lint run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
module github.com/estahn/k8s-image-swapper | ||
|
||
go 1.12 | ||
go 1.16 | ||
|
||
require ( | ||
github.com/alitto/pond v1.4.0 | ||
github.com/aws/aws-sdk-go v1.38.47 | ||
github.com/containers/image/v5 v5.11.0 | ||
github.com/alitto/pond v1.5.0 | ||
github.com/aws/aws-sdk-go v1.38.65 | ||
github.com/containerd/containerd v1.5.2 // indirect | ||
github.com/containers/image/v5 v5.13.2 | ||
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a // indirect | ||
github.com/containers/storage v1.32.4 // indirect | ||
github.com/dgraph-io/ristretto v0.1.0 | ||
github.com/go-co-op/gocron v0.4.0 | ||
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e // indirect | ||
github.com/docker/docker v20.10.7+incompatible // indirect | ||
github.com/go-co-op/gocron v1.6.2 | ||
github.com/golang/glog v0.0.0-20210429001901-424d2337a529 // indirect | ||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||
github.com/google/go-cmp v0.5.6 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/gorilla/mux v1.8.0 // indirect | ||
github.com/hashicorp/errwrap v1.1.0 // indirect | ||
github.com/jmespath/go-jmespath v0.4.0 | ||
github.com/mitchellh/go-homedir v1.1.0 | ||
github.com/pierrec/lz4 v2.0.5+incompatible // indirect | ||
github.com/prometheus/client_golang v1.9.0 | ||
github.com/ostreedev/ostree-go v0.0.0-20210511152353-2ca91aaf921c // indirect | ||
github.com/prometheus/client_golang v1.11.0 | ||
github.com/prometheus/common v0.29.0 // indirect | ||
github.com/rs/zerolog v1.23.0 | ||
github.com/slok/kubewebhook v0.11.0 | ||
github.com/spf13/cobra v1.1.1 | ||
github.com/spf13/viper v1.7.1 | ||
github.com/slok/kubewebhook/v2 v2.1.0 | ||
github.com/spf13/cobra v1.1.3 | ||
github.com/spf13/viper v1.8.0 | ||
github.com/stretchr/objx v0.3.0 // indirect | ||
github.com/stretchr/testify v1.7.0 | ||
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect | ||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect | ||
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect | ||
gopkg.in/yaml.v2 v2.4.0 | ||
k8s.io/api v0.20.1 | ||
k8s.io/apimachinery v0.21.1 | ||
k8s.io/api v0.21.2 | ||
k8s.io/apimachinery v0.21.2 | ||
k8s.io/client-go v0.21.2 // indirect | ||
k8s.io/klog/v2 v2.9.0 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.1.1 // indirect | ||
) |
Oops, something went wrong.