Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

feat: build operator image with chainguard #610

feat: build operator image with chainguard

feat: build operator image with chainguard #610

Workflow file for this run

name: Pull request
on:
- pull_request
jobs:
tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Go vet
run: |
make vet
- name: Unit tests
run: |
make test
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get short commit hash
run: echo "SHORT_SHA=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: |
make build VERSION=dev-${{ env.SHORT_SHA }}
# - name: Docker Image
# uses: docker/build-push-action@v6
# with:
# push: true
# tags: |
# ttl.sh/embedded-cluster-operator-image:dev-${{ env.SHORT_SHA }}
- name: Prepare melange build
run: |
export VERSION=$(git describe --tags --dirty)
make melange-template
cp bin/manager manager
- name: Build melange package
uses: chainguard-dev/actions/melange-build@main
with:
config: deploy/melange.yaml
archs: amd64
sign-with-temporary-key: true
check-crds:
name: Check CRDs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make Manifests
run: make manifests
- name: Check CRDs
run: |
git diff --exit-code --name-only
if [ $? -eq 0 ]; then
echo "CRDs are up to date"
else
echo "CRDs are out of date"
exit 1
fi