This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
forked from benc-uk/kubeview
-
Notifications
You must be signed in to change notification settings - Fork 0
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
8 changed files
with
84 additions
and
115 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,46 @@ | ||
name: CI Build | ||
|
||
# This is a generic CI pipeline that assumes project is to be built as a container image | ||
# Note. CI build only builds 'latest' image, not a versioned release | ||
# Note. REGISTRY_PASSWORD must be set and change the IMAGE_NAME | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
env: | ||
IMAGE_REG: ghcr.io | ||
IMAGE_NAME: kubeview | ||
IMAGE_TAG: latest | ||
|
||
jobs: | ||
ci-build: | ||
name: Code Check & CI build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout code from repo | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
# Ensures Go is configured properly | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.15.7' | ||
|
||
# Validate code | ||
- name: Check code for linting and format errors | ||
run: make lint | ||
|
||
# Build image | ||
- name: Build the container image | ||
run: make image IMAGE_REPO=$GITHUB_ACTOR/$IMAGE_NAME | ||
|
||
# Only when pushing to default branch (e.g. master or main), then push image to registry | ||
- name: Push to container registry | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
run: | | ||
echo ${{ secrets.REGISTRY_PASSWORD }} | docker login $IMAGE_REG -u $GITHUB_ACTOR --password-stdin | ||
make push IMAGE_REPO=$GITHUB_ACTOR/$IMAGE_NAME |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ linters-settings: | |
linters: | ||
enable: | ||
- golint | ||
- gofmt | ||
issues: | ||
include: | ||
- EXC0002 |
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
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