Skip to content

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

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

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

name: Build Sample Apps Containers
on:
push:
branches: [ main ]
paths:
- .github/workflows/build-python-app-containers.yml
- build/containers/Dockerfile.python-app
- samples/apps/**
- version.txt
pull_request:
branches: [ main ]
paths:
- .github/workflows/build-python-app-containers.yml
- build/containers/Dockerfile.python-app
- samples/apps/**
- version.txt
release:
types:
- published
jobs:
build-apps:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
component:
- anomaly-detection-app
- video-streaming-app
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/${{ matrix.component }}
labels: |
org.opencontainers.image.title=akri-${{matrix.component}}
org.opencontainers.image.description=Akri Sample App
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' }}
build-args: |
APPLICATION=${{matrix.component}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: build/containers/Dockerfile.python-app
# Don't build python sample apps for arm/v7 as many modules don't provide armv7 wheels.
platforms: linux/amd64,linux/arm64