use project-akri/examples/ as the path for the example images #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Sample Apps Containers | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - .github/workflows/build-python-app-containers.yml | |
| - build/apps/Dockerfile.python-app | |
| - apps/** | |
| - version.txt | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - .github/workflows/build-python-app-containers.yml | |
| - build/apps/Dockerfile.python-app | |
| - apps/** | |
| - version.txt | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build-apps: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| # Allow GITHUB_TOKEN to push to GHCR | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| matrix: | |
| component: | |
| - anomaly-detection-app | |
| - video-streaming-app | |
| steps: | |
| - name: Checkout the head commit of the branch | |
| uses: actions/checkout@v4 | |
| 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: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker meta | |
| uses: docker/metadata-action@v5 | |
| id: meta | |
| with: | |
| images: ghcr.io/project-akri/examples/${{ 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/apps/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 |