Action for ARM build

This commit is contained in:
aceberg 2022-08-30 12:00:29 +07:00
parent 002ed4f75b
commit 5f93074edb

View file

@ -32,5 +32,35 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to GHCR
# if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
# if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta # you'll use this in the next step
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: ${{ github.actor }}/${{ env.IMAGE_NAME }}
# Docker tags based on the following events/attributes
tags: ${{ env.TAGS }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}