5959d056f3
* WIP. * WIP. * WIP.
162 lines
4.3 KiB
YAML
162 lines
4.3 KiB
YAML
name: "arm64v8 and arm32v7 images"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: m1k1o/neko
|
|
TAG_PREFIX: arm-
|
|
BASE_DOCKERFILE: Dockerfile.arm
|
|
PLATFORMS: linux/arm64,linux/arm/v7
|
|
|
|
jobs:
|
|
build-client:
|
|
runs-on: ubuntu-latest
|
|
#
|
|
# do not run on forks
|
|
#
|
|
if: github.repository_owner == 'm1k1o'
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Set up node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.x
|
|
-
|
|
name: Build client
|
|
run: |
|
|
cd client
|
|
npm install
|
|
npm run build
|
|
-
|
|
name: Upload client dist
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: client-dist
|
|
path: client/dist
|
|
|
|
build-base:
|
|
runs-on: ubuntu-latest
|
|
#
|
|
# do not run on forks
|
|
#
|
|
if: github.repository_owner == 'm1k1o'
|
|
needs: [ build-client ]
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Download client dist
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: client-dist
|
|
path: client/dist
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
name: Extract metadata (tags, labels) for Docker
|
|
uses: docker/metadata-action@v3
|
|
id: meta
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.TAG_PREFIX }}base
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
type=sha,format=long
|
|
-
|
|
name: Log in to the Container registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GHCR_ACCESS_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: ./
|
|
file: .docker/base/${{ env.BASE_DOCKERFILE }}
|
|
platforms: ${{ env.PLATFORMS }}
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
#
|
|
# do not run on forks
|
|
#
|
|
if: github.repository_owner == 'm1k1o'
|
|
needs: [ build-base ]
|
|
strategy:
|
|
# Will build all images even if some fail.
|
|
matrix:
|
|
include:
|
|
- tag: firefox
|
|
dockerfile: Dockerfile.arm
|
|
- tag: chromium
|
|
dockerfile: Dockerfile.arm
|
|
- tag: ungoogled-chromium
|
|
dockerfile: Dockerfile
|
|
- tag: tor-browser
|
|
dockerfile: Dockerfile
|
|
- tag: vlc
|
|
dockerfile: Dockerfile
|
|
- tag: xfce
|
|
dockerfile: Dockerfile
|
|
env:
|
|
TAG_NAME: ${{ matrix.tag }}
|
|
DOCKERFILE: ${{ matrix.dockerfile }}
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
name: Extract metadata (tags, labels) for Docker
|
|
uses: docker/metadata-action@v3
|
|
id: meta
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.TAG_PREFIX }}${{ env.TAG_NAME }}
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
type=sha,format=long
|
|
-
|
|
name: Log in to the Container registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GHCR_ACCESS_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .docker/${{ env.TAG_NAME }}
|
|
file: .docker/${{ env.TAG_NAME }}/${{ env.DOCKERFILE }}
|
|
platforms: ${{ env.PLATFORMS }}
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: |
|
|
BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ env.TAG_PREFIX }}base:sha-${{ github.sha }}
|