Skip to content

feat: add support for arm64 #5

feat: add support for arm64

feat: add support for arm64 #5

Workflow file for this run

name: ci
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'master'
# schedule:
# - cron: "0 1 * * *"
env:
VERSION: 22.04
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=registry,ref=yunnysunny/gitbook:buildcache
cache-to: type=registry,ref=yunnysunny/gitbook:buildcache,mode=max
tags: |
${{ format('yunnysunny/gitbook:{0}', env.VERSION) }}
yunnysunny/gitbook:latest
build-args: |
VERSION=${{ env.VERSION }}
- name: Update core description
uses: peter-evans/dockerhub-description@v2
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: yunnysunny/gitbook