native buildx #6
Workflow file for this run
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-deploy-release-arm64 | ||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- "v3.4.0-arm" | ||
workflow_dispatch: | ||
jobs: | ||
deploy-images: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
distro: | ||
- container: "ubuntu:focal" | ||
env: | ||
registry: ghcr.io | ||
username: susom | ||
repository: geocoder | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Create latest tag variable | ||
run: | | ||
container="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:latest" | ||
echo "container=${container}" >> $GITHUB_ENV | ||
- name: Create release tag variable | ||
if: github.event_name == 'release' | ||
run: | | ||
versioned="${{ env.registry }}/${{ env.username}}/${{ env.repository }}:${GITHUB_REF##*/}" | ||
echo "versioned=${versioned}" >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build image | ||
id: build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: ${{ matrix.platform }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
load: true | ||
tags: ${{ env.container }} | ||
- name: Test image | ||
run: | | ||
docker run --platform ${{ matrix.platform }} --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file.csv | ||
docker run --platform ${{ matrix.platform }} --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file.csv 0.6 | ||
docker run --platform ${{ matrix.platform }} --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file.csv all | ||
- name: Login to ghcr | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.registry }} | ||
username: ${{ env.username }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push image | ||
id: build | ||
Check failure on line 74 in .github/workflows/build-deploy-release-arm64.yaml
|
||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: ${{ matrix.platform }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
push: true | ||
tags: ${{ env.container }} |