Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/userbradley/action-ko-build
Action to run KO build on a directory and push to Google Artifact Registry
https://github.com/userbradley/action-ko-build
Last synced: 28 days ago
JSON representation
Action to run KO build on a directory and push to Google Artifact Registry
- Host: GitHub
- URL: https://github.com/userbradley/action-ko-build
- Owner: userbradley
- License: mit
- Created: 2024-03-16T00:42:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-19T00:06:06.000Z (6 months ago)
- Last Synced: 2024-10-15T03:31:10.098Z (2 months ago)
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GitHub Action: ko Build
KO Build action to build Go Containers without the grim Dockerfile
## Quickstart
```yaml
name: "KO: Do the thing"
on:
push:
branches:
- main
- feature/**
paths:
- .github/workflows/ko-do-the-thing.yaml
- containers/example/**
jobs:
docker-build:
name: Docker Build
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Authenticate to Google
uses: google-github-actions/auth@v2
with:
project_id: 'my-project'
workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: 1.21.4
cache-dependency-path: |
containers/do-the-thing/go.sum
- name: Ko build
uses: userbradley/[email protected]
with:
repository: example
googleProject: example-project
image: do-the-thing
directory: containers/do-the-thing
```
## Inputs| Name | Description | Required | Default Value |
|-----------------|----------------------------------------------------------|----------|---------------|
| `repository` | Name of the Artifact Registry Repository | `true` | `Null` |
| `googleProject` | Name of the google artifact registry project | `true` | `Null` |
| `image` | Name of the Image to build | `true` | `Null` |
| `directory` | Location of the directory to build the docker image from | `true` | `Null` |