Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .codecov.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .conform.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/renovate.json

This file was deleted.

113 changes: 113 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: build

on:
push:
branches:
#- patches
- cleanup/build-infra
tags:
- v*
pull_request:
workflow_dispatch:

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: test and lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: set up buildx
uses: docker/setup-buildx-action@v3
- name: unit tests
run: |
make unit-tests
- name: lint
run: |
make lint

setup:
name: setup
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
outputs:
REGISTRY: ${{ steps.registry.outputs.REGISTRY }}
USERNAME: ${{ steps.registry.outputs.USERNAME }}
steps:
- name: registry
id: registry
run: |
if [ "${REGISTRY_PROJECT%%/*}" = "${REGISTRY_PROJECT}" ]; then
echo "::error::vars.REGISTRY_PROJECT must be <REGISTRY>/<USERNAME>"
exit 1
fi
echo "REGISTRY=${REGISTRY_PROJECT%%/*}" >> "${GITHUB_OUTPUT}"
echo "USERNAME=${REGISTRY_PROJECT#*/}" >> "${GITHUB_OUTPUT}"
env:
REGISTRY_PROJECT: ${{ vars.REGISTRY_PROJECT }}

image:
name: push image
needs:
- check
- setup
runs-on: ubuntu-latest
env:
REGISTRY: ${{ needs.setup.outputs.REGISTRY }}
USERNAME: ${{ needs.setup.outputs.USERNAME }}
steps:
- name: checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: set up buildx
uses: docker/setup-buildx-action@v3
- name: login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_SECRET }}
- name: build and push
run: |
make image-image-factory PUSH=true PLATFORM=linux/amd64,linux/arm64
- name: push latest
if: github.ref == 'refs/heads/patches'
run: |
make image-image-factory PUSH=true PLATFORM=linux/amd64,linux/arm64 IMAGE_TAG=latest

helm:
name: push chart
needs:
- check
- setup
runs-on: ubuntu-latest
env:
REGISTRY: ${{ needs.setup.outputs.REGISTRY }}
USERNAME: ${{ needs.setup.outputs.USERNAME }}
steps:
- name: checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: set up helm
uses: azure/setup-helm@v4
- name: set the chart version from the git tag
run: |
make chart-version CHART_VERSION="$(git describe --tag --always --dirty --match 'v[0-9]*')"
- name: login to registry
run: |
echo "${REGISTRY_SECRET}" | helm registry login -u "${REGISTRY_USERNAME}" --password-stdin "${REGISTRY}"
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_SECRET: ${{ secrets.REGISTRY_SECRET }}
- name: package and push
run: |
make helm
helm push _out/image-factory-*.tgz "oci://${REGISTRY}/${USERNAME}/charts"
Loading
Loading