-
Notifications
You must be signed in to change notification settings - Fork 108
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
9 changed files
with
143 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,64 @@ | ||
# Contributing Guidance | ||
Hello! Thanks for taking an interest in my project/repo. | ||
# Welcome | ||
|
||
Contributions to this project are welcome of course, otherwise I wouldn't have put it on GitHub 😃 however there's a few things I'd like to point out: | ||
Hello! Thanks for taking an interest in this project and code :) | ||
|
||
Contributions to this project are welcome of course, otherwise it wouldn't reside on GitHub 😃 however there's a few things to be aware of: | ||
|
||
- This is a personal project, it is not maintained by a team or group. | ||
- The code here is not production grade, you won't see many unit tests or other 'robust' practices in the code base. | ||
- I might have written things a certain way either by ignorance of a better/faster/cooler approach, maybe by design or just simple pragmatism. | ||
- It might take me a long time (weeks) to reply to issues or review PRs, I have a day job & I might not have looked at the code for a while. | ||
- It might take a long time for the maintainer(s) to reply to issues or review PRs, they will have have a day jobs & might not have looked at the code for a while. | ||
- The code here is likely to not be bullet proof & production grade, there might be a lack of unit tests or other practices missing from the code base. | ||
|
||
# Contributing | ||
|
||
There's several ways of contributing to this project, and effort has been made to make this as easy and transparent as possible, whether it's: | ||
|
||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
- Becoming a maintainer | ||
|
||
## All code changes happen though pull requests (PRs) | ||
|
||
Pull requests are the best way to propose changes to the codebase (using the standard [Github Flow](https://guides.github.com/introduction/flow/index.html)). | ||
|
||
Some PR guidance: | ||
|
||
- Please keep PRs small and focused on a single feature or change, with discreet commits. Use multiple PRs if need be. | ||
- If you're thinking of adding a feature via a PR please create an issue first where it can be discussed. | ||
|
||
High level steps: | ||
|
||
1. Fork the repo and create your branch from `master` or `main`. | ||
2. If you've changed APIs, update the documentation. | ||
3. Ensure the test suite (if any) passes (run `make lint`). | ||
4. Make sure your code lints (run `make lint`). | ||
5. Issue that pull request! | ||
|
||
## Any contributions you make will be under the MIT Software License | ||
|
||
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. | ||
|
||
## Report bugs using Github's issues | ||
|
||
This project uses GitHub issues to track public bugs. Report a bug by [opening a new issue](./issues/new/choose) | ||
|
||
## Write bug reports with detail, background, and sample code | ||
|
||
**Great Bug Reports** tend to have: | ||
|
||
- A quick summary and/or background | ||
- Steps to reproduce | ||
- Be specific! | ||
- Give sample code if you can. Even if it's a snippet | ||
- What you expected would happen | ||
- What actually happens | ||
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) | ||
|
||
## Use a consistent coding style | ||
|
||
A few pointers | ||
Run `make lint-fix` in order to format the code fix any formatting & linting issues that might be present. A [Prettier](https://prettier.io/) configuration file is included | ||
|
||
- If you're thinking of adding a feature via a PR please create an issue first and we can discuss it. | ||
- Please keep PRs small and focused on a single feature or change, with discreet commits. Multiple PRs if need be. | ||
# References | ||
|
||
Thanks! | ||
This document was heavily adapted from the open-source contribution guidelines found in [this gist](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62) |
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