-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update gh-action components and go to 1.19
build: switch to ko-build/setup-ko build: update helm-gh-pages action build: fix token check build: configure dependabot for gh-actions
- Loading branch information
1 parent
3c55012
commit c47466f
Showing
5 changed files
with
33 additions
and
472 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
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,32 +1,32 @@ | ||
name: Test and publish | ||
name: Publish | ||
|
||
on: [push, pull_request] | ||
on: [push] | ||
|
||
jobs: | ||
check-gh-token: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
gh-token: ${{ steps.gh-token.outputs.defined }} | ||
HAS_DOCKERHUB_TOKEN: ${{ steps.gh-token.outputs.HAS_DOCKERHUB_TOKEN }} | ||
steps: | ||
- id: gh-token | ||
env: | ||
MY_KEY: ${{ secrets.GITHUB_TOKEN }} | ||
if: "${{ env.MY_KEY != '' }}" | ||
run: echo "::set-output name=defined::true" | ||
HAS_DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN != '' }} | ||
run: | | ||
echo "HAS_DOCKERHUB_TOKEN=$HAS_DOCKERHUB_TOKEN" >> $GITHUB_OUTPUT | ||
echo "HAS_DOCKERHUB_TOKEN=$HAS_DOCKERHUB_TOKEN" >> $GITHUB_STEP_SUMMARY | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
|
||
- name: install and run golangci-lint | ||
uses: golangci/golangci-lint-action@v3.2.0 | ||
uses: golangci/golangci-lint-action@v3.4.0 | ||
with: | ||
version: v1.48.0 | ||
skip-go-installation: true | ||
version: v1.51.2 | ||
args: --timeout=3m | ||
|
||
test: | ||
|
@@ -35,15 +35,15 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
|
||
- name: Download K8s envtest - local K8s cluster control plane | ||
run: | | ||
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest | ||
mkdir -p local/envtest-bin/ | ||
setup-envtest use -p env 1.24.x --bin-dir local/envtest-bin > local/envtest-bin/env | ||
- name: Run Unit tests | ||
- name: Run Unit tests @ | ||
run: | | ||
source local/envtest-bin/env | ||
export KUBEBUILDER_ASSETS=$(pwd)/$KUBEBUILDER_ASSETS | ||
|
@@ -73,9 +73,9 @@ jobs: | |
uses: helm/[email protected] | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
stable: true | ||
- uses: imjasonh/[email protected] | ||
- uses: ko-build/[email protected] | ||
name: Setup ko | ||
env: | ||
KO_DOCKER_REPO: docker.io/postfinance | ||
|
@@ -115,20 +115,20 @@ jobs: | |
if: | | ||
startsWith(github.ref, 'refs/tags/v') && | ||
!github.event.pull_request.head.repo.fork && | ||
needs.check-gh-token.outputs.gh-token == 'true' | ||
needs.check-gh-token.outputs.HAS_DOCKERHUB_TOKEN == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
stable: true | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: postfinance | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: imjasonh/[email protected] | ||
- uses: ko-build/[email protected] | ||
name: Setup ko | ||
env: | ||
KO_DOCKER_REPO: docker.io/postfinance | ||
|
@@ -148,13 +148,13 @@ jobs: | |
if: | | ||
startsWith(github.ref, 'refs/tags/v') && | ||
!github.event.pull_request.head.repo.fork && | ||
needs.check-gh-token.outputs.gh-token == 'true' | ||
needs.check-gh-token.outputs.HAS_DOCKERHUB_TOKEN == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
stable: true | ||
|
||
- name: Install Helm | ||
|
@@ -163,7 +163,7 @@ jobs: | |
version: v3.5.0 | ||
|
||
- name: Run chart-releaser | ||
uses: stefanprodan/helm-gh-pages@b43a8719cc63fdb3aa943cc57359ab19118eab3f #v1.5.0 | ||
uses: stefanprodan/helm-gh-pages@v1.7.0 | ||
with: | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
@@ -175,21 +175,21 @@ jobs: | |
if: | | ||
github.ref == 'refs/heads/main' && | ||
!github.event.pull_request.head.repo.fork && | ||
needs.check-gh-token.outputs.gh-token == 'true' | ||
needs.check-gh-token.outputs.HAS_DOCKERHUB_TOKEN == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
stable: true | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: postfinance | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: imjasonh/[email protected] | ||
- uses: ko-build/[email protected] | ||
name: Setup ko | ||
env: | ||
KO_DOCKER_REPO: docker.io/postfinance | ||
|
@@ -207,21 +207,21 @@ jobs: | |
if: | | ||
startsWith(github.ref, 'refs/heads/feat') && | ||
!github.event.pull_request.head.repo.fork && | ||
needs.check-gh-token.outputs.gh-token == 'true' | ||
needs.check-gh-token.outputs.HAS_DOCKERHUB_TOKEN == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
go-version: 1.19 | ||
stable: true | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: postfinance | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: imjasonh/[email protected] | ||
- uses: ko-build/[email protected] | ||
name: Setup ko | ||
env: | ||
KO_DOCKER_REPO: docker.io/postfinance | ||
|
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 |
---|---|---|
|
@@ -69,7 +69,6 @@ linters: | |
- misspell | ||
- nakedret | ||
- prealloc | ||
- rowserrcheck | ||
- exportloopref | ||
- staticcheck | ||
- stylecheck | ||
|
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
Oops, something went wrong.