-
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.
Signed-off-by: Maartje Eyskens <[email protected]>
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
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: docker-image | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-ghcr | ||
release: | ||
|
||
|
||
jobs: | ||
build-test: | ||
name: build | ||
permissions: | ||
contents: read | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install just | ||
uses: taiki-e/install-action@just | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Create Kind Cluster | ||
uses: helm/kind-action@v1 | ||
with: | ||
cluster_name: kind | ||
- name: Install ko | ||
uses: ko-build/[email protected] | ||
env: | ||
KO_DOCKER_REPO: kind.local | ||
- name: Install dependencies | ||
run: | | ||
go mod download | ||
- name: Set KO_TAG to the current commit | ||
run: echo "KO_TAG=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
- name: Set KO_TAG to version if it is a release | ||
if: github.event_name == 'release' | ||
run: echo "KO_TAG=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_ENV | ||
- name: Run a ko build | ||
run: just build | ||
env: | ||
KO_DOCKER_REPO: ghcr.io/cofide/cofidectl-debug-container/cmd | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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