Skip to content

Commit

Permalink
change workflow fix platform
Browse files Browse the repository at this point in the history
  • Loading branch information
falmar committed Apr 29, 2023
1 parent 5f4c960 commit 4595e1b
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,22 @@ env:
DOCKER_IMAGE_TAG: ${{ inputs.image_tag }}

jobs:
push_image:
strategy:
matrix:
platform: [linux/amd64,linux/arm64]
image:
env:
platform: linux/amd64,linux/arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: jungwinter/split@v2
id: split
with:
msg: ${{ matrix.platform }}
separator: /

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.platform }}
platforms: ${{ env.platform }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: ${{ matrix.platform }}
platforms: ${{ env.platform }}

- name: Login to Docker Hub
uses: docker/login-action@v2
Expand All @@ -52,10 +45,10 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: ${{ matrix.platform }}
platforms: ${{ env.platform }}
context: .
push: true
file: ./build/lambda.Dockerfile
tags: ${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_IMAGE_TAG }}
cache-from: type=gha,scope=$GITHUB_REF_NAME-${{ steps.split.outputs._1 }}
cache-to: type=gha,mode=max,scope=$GITHUB_REF_NAME-${{ steps.split.outputs._1 }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 4595e1b

Please sign in to comment.