Skip to content

feat: support arm

feat: support arm #9

Workflow file for this run

name: Test Build & Run
on:
pull_request:
permissions:
contents: read
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set version
# Always use git tags as semantic release can fail due to rate limit
run: |
git fetch --prune --unshallow
echo "RELEASE_VERSION=$(git describe --abbrev=0 --tags | sed -e 's/^v//')" >> $GITHUB_ENV
- name: Set up Docker Buildx #must be executed before a step that contains platforms
uses: docker/setup-buildx-action@v2
- name: Build image for multiple platforms
run: |
docker buildx build --load --platform linux/amd64 -t flanksource/base-image:${{ env.RELEASE_VERSION }} .
docker buildx build --load --platform linux/arm64 -t flanksource/base-image:${{ env.RELEASE_VERSION }} .
- name: Run the container
run: |
docker run --pull=never --rm flanksource/base-image:${{ env.RELEASE_VERSION }} echo 'hello world'