-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Convert CI to Github Actions * Golang 1.20 * Only login on pushes
- Loading branch information
1 parent
8698aff
commit 5062430
Showing
6 changed files
with
70 additions
and
202 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.20' | ||
|
||
- name: Build | ||
run: go build ./... | ||
|
||
- name: Test | ||
run: go test ./... | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest |
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,40 @@ | ||
name: Docker | ||
|
||
on: | ||
pull_request: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- main | ||
|
||
permissions: | ||
packages: write | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
|
||
- name: Build Docker Image | ||
run: make build | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
if: github.event_name == 'push' | ||
with: | ||
username: USERNAME | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Docker Image | ||
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' | ||
run: make push | ||
|
||
- name: Push Latest Docker Image | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
run: make push-latest |
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,4 +1,4 @@ | ||
name: Publish helm chart | ||
name: Publish Helm Chart | ||
|
||
on: | ||
push: | ||
|
@@ -28,4 +28,4 @@ jobs: | |
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_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