Skip to content

moved to kubebuilder and daemonset broker #73

moved to kubebuilder and daemonset broker

moved to kubebuilder and daemonset broker #73

Workflow file for this run

name: CI
on:
push:
branches:
- main
- "v*.*.x"
tags:
- "v*.*.*"
jobs:
setup:
name: Setup
runs-on: ubuntu-22.04
outputs:
components: ${{ steps.set-matrix.outputs.components }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- id: set-matrix
name: Output component builds
run: |
echo "components=$(ls ./components/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
publish-docs:
name: Publish docs
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate docs
run: pip install pipenv && make docs
- name: Upload docs
uses: actions/upload-pages-artifact@v1
with:
path: site/
- name: Publish docs
uses: actions/deploy-pages@v2
publish-component:
name: Publish components
runs-on: ubuntu-22.04
needs: setup
strategy:
fail-fast: false
matrix:
component: ${{ fromJSON(needs.setup.outputs.components) }}
permissions:
contents: read
packages: write
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: components/${{ matrix.component }}/go.mod
cache-dependency-path: components/${{ matrix.component }}/go.sum
- name: Build and push component
run: |
make push/${{ matrix.component }} GIT_REF="${{ github.ref_name }}"
release:
name: Release
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/v')
needs: publish-component
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create release
uses: softprops/action-gh-release@v1