We welcome contributions from the community and first want to thank you for taking the time to contribute!
Please familiarize yourself with the Code of Conduct before contributing.
Before you start working with build-image-action, please read and sign our Contributor License Agreement CLA. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will prompt you to do so when you open a Pull Request. For any questions about the CLA process, please refer to our FAQ.
We welcome many types of contributions and not all of them need a Pull request. Contributions may include:
- New features and proposals
- Documentation
- Bug fixes
- Issue Triage
- Answering questions and giving feedback
- Helping to onboard new contributors
- Other related activities
-
Install and setup kpack
-
Install kpack cli
-
Create dev namespace
kubectl create namespace dev
-
Create a secret with push credentials for the docker registry that you plan on publishing OCI images to with kpack
kubectl create secret docker-registry kpack-registry-credentials \ --docker-username=_json_key \ --docker-password="$(cat key.json)" \ --docker-server=gcr.io \ --namespace dev
-
Create a ClusterBuilder (and ServiceAccount, ClusterStore, ClusterStack)
ytt -v tag=<my-clusterbuilder-tag> -f hack/kpack.yaml | kubectl apply -f -
For example:
ytt -v tag=gcr.io/kontinue/emj/clusterbuilder -f hack/kpack.yaml | kubectl apply -f -
-
Get appropriate permissions to run
kubectl apply -f config/rbac.yaml eval "$(./config/get_auth.sh)"
NAMESPACE=dev GITHUB_SERVER_URL=https://github.com GITHUB_REPOSITORY=<my-repo> GITHUB_SHA=<my-sha> TAG=<my-tag> GITHUB_OUTPUT=<my-output> SERVICE_ACCOUNT_NAME=kpack-service-account go run main.go
For example:
GITHUB_SERVER_URL=https://github.com \
GITHUB_REPOSITORY=emmjohnson/github-actions-poc \
GITHUB_SHA=e84d037eedbbd7fefc8da0e2c7609e05faef5f0e \
GITHUB_OUTPUT=/Users/emjohnson/sandbox/vmware-tanzu/build-image-action/output.txt \
NAMESPACE=dev \
TAG=gcr.io/kontinue/emj/app-action \
SERVICE_ACCOUNT_NAME=kpack-service-account \
go run main.go
kubectl get builds -n dev
kubectl get pods -n dev
cat /Users/emjohnson/sandbox/vmware-tanzu/build-image-action/output.txt
name=gcr.io/kontinue/emj/app-action@sha256:a37e5abcefaa73417eff08f9771840460334d0543287a777c40d16f15ab0ecca
- Fork Gareth's poc - https://github.com/garethjevans/github-actions-poc
- In
.github/workflows/supply-chain.yaml
, stepBuild Image
, updatedestination
with your registry - Create a Secret for
PRIVATE_REPO_ACCESS_TOKEN
withread:packages, repo
- In
- Modify the
build-and-push
step in.github/workflows/publish-image.yaml
to always push - In
action.yml
, modifyruns.image
to point to the image that will be created in step 1 - In your poc, step
Check out source code
, add the appropriateref
- In your poc, step
ghcr.io docker registry login
, change thedocker pull
command to point to the correct image created in step 1
This is a rough outline of what a contributor's workflow looks like:
- Make a fork of the repository within your GitHub account
- Create a topic branch in your fork from where you want to base your work
- Make commits of logical units
- Make sure your commit messages are with the proper format, quality and descriptiveness (see below)
- Push your changes to the topic branch in your fork
- Create a pull request containing that commit
We follow the GitHub workflow and you can find more details on the GitHub flow documentation.
Before submitting your pull request, we advise you to use the following:
- Check if your code changes will pass both code linting checks and unit tests.
- Ensure your commit messages are descriptive. We follow the conventions on How to Write a Git Commit Message. Be sure to include any related GitHub issue references in the commit message. See GFM syntax for referencing issues and commits.
- Check the commits and commits messages and ensure they are free from typos.
For specifics on what to include in your report, please follow the guidelines in the issue and pull request templates when available.
The best way to reach us with a question when contributing is to ask on:
- The original GitHub issue