Updated container example for dynamic user #107
This file contains 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 container-example application | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "container-example/**" | |
- "!container-example/README.md" | |
- ".github/workflows/container-example.yml" | |
jobs: | |
test-app: | |
name: Test app | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- arch: armv7hf | |
platformarch: "linux/arm/v7" | |
axis-os: 11.10.59 | |
- arch: aarch64 | |
platformarch: "linux/arm64/v8" | |
axis-os: 11.10.59 | |
env: | |
EXREPO: acap-native-examples | |
EXNAME: container-example | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build ${{ env.EXNAME }} application | |
env: | |
imagetag: ${{ env.EXREPO }}_${{ env.EXNAME }}:${{ matrix.arch }} | |
alpinetag: 3.19.1 | |
run: | | |
docker image rm -f $imagetag | |
cd $EXNAME | |
docker pull --platform=${{ matrix.platformarch}} alpine:$alpinetag | |
docker save -o alpine.tar alpine:$alpinetag | |
docker build --no-cache --tag $imagetag --output build . | |
cd .. | |
docker image rm -f $imagetag |