Skip to content

fix: align default policy YAML with CRD schema #15

fix: align default policy YAML with CRD schema

fix: align default policy YAML with CRD schema #15

Workflow file for this run

name: Build and Push Images
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
REGISTRY: ghcr.io/alexsjones/k8sclaw
permissions:
contents: read
packages: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Vet
run: go vet ./...
- name: Test
run: go test -race -short ./...
build-and-push:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
matrix:
image:
- controller
- apiserver
- ipc-bridge
- webhook
- channel-telegram
- channel-whatsapp
- channel-discord
- channel-slack
steps:
- uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ matrix.image }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix=
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: images/${{ matrix.image }}/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max