Skip to content

Commit

Permalink
Merge pull request #327 from controlplaneio/kubesec-updates
Browse files Browse the repository at this point in the history
chore: update and simplify future updates
  • Loading branch information
06kellyjac authored Jul 6, 2022
2 parents 8c562f3 + 04a41e3 commit 7334ccf
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 198 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint_bash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v3

- name: Run shellcheck
uses: reviewdog/action-shellcheck@v1.14
uses: reviewdog/action-shellcheck@v1
with:
pattern: "*.${{ matrix.extention }}"
exclude: "./test/bin/*"
2 changes: 1 addition & 1 deletion .github/workflows/lint_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
uses: actions/checkout@v3

- name: Run hadolint
uses: reviewdog/action-hadolint@v1.28
uses: reviewdog/action-hadolint@v1
2 changes: 1 addition & 1 deletion .github/workflows/lint_yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
uses: actions/checkout@v3

- name: Run yamllint
uses: reviewdog/action-yamllint@v1.5
uses: reviewdog/action-yamllint@v1
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
uses: actions/setup-go@v3
id: go
with:
go-version: ^1.17
go-version: ^1.18

- name: Check out code
uses: actions/checkout@v3

- name: Launch goreleaser
uses: goreleaser/goreleaser-action@v2.9.1
uses: goreleaser/goreleaser-action@v2
with:
args: release
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Cache container layers
uses: actions/cache@v3.0.2
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}${{ matrix.containers.suffix }}-buildx-${{ github.sha }}
Expand All @@ -34,7 +34,7 @@ jobs:

- name: Generate container tags and labels
id: docker_meta
uses: docker/metadata-action@v3.7.0
uses: docker/metadata-action@v4
with:
# images: kubesec/kubesec,ghcr.io/controlplaneio/kubesec
images: kubesec/kubesec
Expand All @@ -49,24 +49,24 @@ jobs:
org.opencontainers.image.url=https://kubesec.io/
- name: Login to Docker Hub Registry
uses: docker/login-action@v1.14.1
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1.14.1
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.CR_PAT }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2

- name: Build container and push tags
uses: docker/build-push-action@v2.9.0
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
uses: actions/setup-go@v3
id: go
with:
go-version: ^1.16
go-version: ^1.18

- name: Build kubesec
run: |
make build
- name: Upload kubesec
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: kubesec
path: dist/kubesec
Expand All @@ -59,7 +59,7 @@ jobs:
uses: actions/checkout@v3

- name: Download kubesec
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: kubesec
path: dist
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18.1 AS builder
FROM golang:1.18 AS builder

WORKDIR /kubesec

Expand All @@ -8,7 +8,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o kubesec .

# ===

FROM alpine:3.15.4
FROM alpine:3.16

RUN addgroup -S kubesec \
&& adduser -S -g kubesec kubesec \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.scratch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18.1-alpine AS builder
FROM golang:1.18-alpine AS builder

RUN echo "kubesec:x:31012:31012:kubesec:/home/kubesec:/sbin/nologin" > /passwd && \
echo "kubesec:x:31012:" > /group
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/in-toto/in-toto-golang v0.3.3
github.com/instrumenta/kubeval v0.16.1
github.com/prometheus/client_golang v1.12.1
github.com/spf13/cobra v1.3.0
github.com/prometheus/client_golang v1.12.2
github.com/spf13/cobra v1.5.0
github.com/thedevsaddam/gojsonq/v2 v2.5.2
go.uber.org/zap v1.21.0
)
Expand All @@ -25,18 +25,18 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/common v0.35.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/shibumi/go-pathspec v1.2.0 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
google.golang.org/protobuf v1.27.1 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 7334ccf

Please sign in to comment.