Skip to content

Add Helm pre-delete hook to remove configurations before Akri chart c… #865

Add Helm pre-delete hook to remove configurations before Akri chart c…

Add Helm pre-delete hook to remove configurations before Akri chart c… #865

name: Build OPC UA Monitoring Broker
on:
push:
branches: [ main ]
paths:
- .github/workflows/build-opcua-monitoring-broker-container.yml
- build/containers/Dockerfile.opcua-monitoring-broker
- samples/brokers/opcua-monitoring-broker/**
- version.txt
pull_request:
branches: [ main ]
paths:
- .github/workflows/build-opcua-monitoring-broker-container.yml
- build/containers/Dockerfile.opcua-monitoring-broker
- samples/brokers/opcua-monitoring-broker/**
- version.txt
release:
types:
- published
jobs:
build-broker:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Get version.txt
id: version-string
run: |
echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name == 'push' || github.event_name == 'release'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.crUsername }}
password: ${{ secrets.crPassword }}
- name: Docker meta
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/project-akri/akri/opcua-monitoring-broker
labels: |
org.opencontainers.image.title=akri-opcua-monitoring-broker
org.opencontainers.image.description="Akri sample OPC UA monitoring broker"
tags: |
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=raw,value=v${{steps.version-string.outputs.version}}-dev,enable=${{github.event_name != 'release'}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: build/containers/Dockerfile.opcua-monitoring-broker
platforms: linux/amd64,linux/arm64,linux/arm/v7