Skip to content

native buildx

native buildx #6

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

View workflow run for this annotation

GitHub Actions / build-deploy-release-arm64

Invalid workflow file

The workflow is not valid. .github/workflows/build-deploy-release-arm64.yaml (Line: 74, Col: 13): The identifier 'build' may not be used more than once within the same scope.
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 }}