Update arm64 arm of docker ci

This commit is contained in:
Eric Mastro 2023-05-05 15:32:54 +10:00 committed by benbierens
parent 379371d440
commit 05fc986eb9
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 27 additions and 7 deletions

View File

@ -49,10 +49,11 @@ jobs:
if: github.event_name != 'pull_request'
docker-arm64:
runs-on: buildjet-2vcpu-ubuntu-2204-arm
runs-on: buildjet-4vcpu-ubuntu-2204-arm
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
@ -61,28 +62,47 @@ jobs:
tags: |
type=semver,pattern={{version}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and export to Docker
id: build
uses: docker/build-push-action@v4
with:
context: .
file: docker/codex.Dockerfile
platforms: linux/arm64
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Minify docker image
uses: kitabisa/docker-slim-action@v1
env:
DSLIM_HTTP_PROBE: false
with:
target: ${{ steps.meta.outputs.labels }}
tag: ${{ steps.meta.outputs.tags }}
- name: Push image to docker registry
run: docker image push "${{ steps.meta.outputs.labels }}:${{ steps.meta.outputs.tags }}"
target: ${{ steps.meta.outputs.tags }}
overwrite: true
- name: Show slim report
run: echo "${{ steps.slim.outputs.report }}"
- name: Push to Docker registry
if: github.event_name != 'pull_request'
id: push
uses: docker/build-push-action@v4
with:
context: .
file: docker/codex.Dockerfile
platforms: linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}