Skip to content

Commit

Permalink
add container build for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrai2 committed Aug 6, 2024
1 parent 1dab2e1 commit 8efdc29
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,51 @@ jobs:
- name: lint changed and added files
run: |
pylint --rcfile=.pylintrc --fail-under 9 shiny_invoice/
build-container:
runs-on: ubuntu-latest
# needs: deploy
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
env:
REGISTRY_IMAGE: shiny_invoice
permissions:
packages: write
contents: read
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build images
uses: docker/build-push-action@v5
with:
context: .
# push: true
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/${{ env.REGISTRY_IMAGE }}:latest

0 comments on commit 8efdc29

Please sign in to comment.