fix dockerfile for arm64

This commit is contained in:
Jun Kurihara 2023-07-25 00:11:44 +09:00
commit deb7eb1202
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
5 changed files with 19 additions and 74 deletions

73
.github/workflows/docker_build_push.yml vendored Normal file
View file

@ -0,0 +1,73 @@
name: Build and Publish Docker x86_64
on:
push:
branches:
- main
- develop
jobs:
build_and_push:
runs-on: ubuntu-latest
env:
IMAGE_NAME: rpxy
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: GitHub Environment
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Release build and push
if: ${{ env.BRANCH == 'main' }}
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
file: ./docker/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
- name: Release build and push slim
if: ${{ env.BRANCH == 'main' }}
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:slim, ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest-slim
file: ./docker/Dockerfile.amd64-slim
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
- name: Nightly build and push
if: ${{ env.BRANCH == 'develop' }}
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:nightly
file: ./docker/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64