Skip to content

.github/workflows/image-build.yml #5

.github/workflows/image-build.yml

.github/workflows/image-build.yml #5

Workflow file for this run

on:
workflow_call: {}
schedule:
# Weekdays at noon GMT
- cron: '00 12 * * 1-5'
jobs:
image:
name: Image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- uses: ko-build/[email protected]
- run: |
ko build --platform=linux/amd64,linux/arm64 --push=${{ github.ref == 'refs/heads/main' }} ./cmd/server \
--image-label=org.opencontainers.image.source=https://github.com/stacklok/mediator,org.opencontainers.image.title="Stacklok Mediator",org.opencontainers.image.licenses=Apache-2.0,org.opencontainers.image.vendor=Stacklok
check-helm:
name: Build Helm chart
# TODO: remove the 'image' build once helm build is stable, because ko resolve will build the image
runs-on: ubuntu-latest
permissions:
contents: read
packages: none
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ko-build/[email protected]
- uses: azure/setup-helm@v3
with:
version: v3.12.2
- run: |
make helm
env:
KO_DOCKER_REPO: "ko.local"
KO_PUSH_IMAGE: "false"
docker-image:
name: Check docker image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Test build on x86
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: false # Only attempt to build, to verify the Dockerfile is working