Skip to content

Commit

Permalink
feat: add Ko config path input
Browse files Browse the repository at this point in the history
adds an input to specify the path to a .ko.yaml config file
  • Loading branch information
BobyMCbobs authored and ozym committed Oct 15, 2023
1 parent 24987f7 commit 081ff94
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/reusable-go-container-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ on:
type: string
description: |
shell commands to setup the build environment
koBuildConfigPath:
required: false
type: string
default: .ko.yaml
description: |
the path to a Ko config yaml
secrets:
GH_CI_USER_TOKEN:
required: false
Expand All @@ -119,6 +125,7 @@ jobs:
registryGhcrUsernameOverride: ${{ inputs.registryGhcrUsernameOverride }}
setup: ${{ inputs.buildSetup }}
platforms: ${{ inputs.platforms }}
configPath: ${{ inputs.koBuildConfigPath }}
scan:
if: ${{ contains(fromJSON('["workflow_call", "workflow_dispatch", "push", "release"]'), github.event_name) && inputs.containerScanningEnabled && startsWith(github.repository, 'GeoNet/') != false }}
needs: build
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/reusable-ko-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ on:
type: string
description: |
shell commands to setup the build environment
configPath:
required: false
type: string
default: .ko.yaml
description: |
the path to a Ko config yaml
secrets:
GH_CI_USER_TOKEN:
required: false
Expand Down Expand Up @@ -155,6 +161,7 @@ jobs:
name: build
env:
KO_DOCKER_REPO: ${{ steps.run-info.outputs.ko-docker-repo }}
KO_CONFIG_PATH: ${{ inputs.configPath }}
IMAGES_PATH: ${{ steps.run-info.outputs.paths }}
PUSH: ${{ inputs.push }}
PLATFORMS: ${{ inputs.platforms }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
# aws-role-duration-seconds: "3600"
# setup: |
# sudo apt install -y something-needed-for-build
# configPath: .ko.yaml
```

- dynamic build of images based on entrypoints (where there is a `package main`), unless if _inputs.paths_ is set
Expand Down Expand Up @@ -789,6 +790,7 @@ jobs:
# aws-role-duration-seconds: "3600"
# buildSetup: |
# sudo apt install -y something-needed-for-build
# koBuildConfigPath: .ko.yaml
```

for configuration see [`on.workflow_call.inputs` in .github/workflows/reusable-go-container-apps.yml](.github/workflows/reusable-go-container-apps.yml).
Expand Down

0 comments on commit 081ff94

Please sign in to comment.