Skip to content

Build

Build #61

Workflow file for this run

name: "Build"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
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: "Set up cache"
uses: actions/cache@v3
with:
path: "/tmp/.buildx-cache"
key: "${{ runner.os }}-buildx-${{ github.sha }}"
restore-keys: |
${{ runner.os }}-buildx-
- name: "Login to DockerHub"
uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_TOKEN }}"
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v2
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: "Build and push lancachenet/ubuntu"
run: |
git clone https://github.com/lancachenet/ubuntu.git
cd ubuntu
docker buildx build --platform linux/arm/v7,linux/arm64 -t joshuasing/lancache-ubuntu -t ghcr.io/joshuasing/lancache-ubuntu --push .
cd ..
- name: "Build and push lancachenet/ubuntu-nginx"
run: |
git clone https://github.com/lancachenet/ubuntu-nginx.git
cd ubuntu-nginx
sed -i '1cFROM joshuasing/lancache-ubuntu' Dockerfile
cat Dockerfile
docker buildx build --platform linux/arm/v7,linux/arm64 -t joshuasing/lancache-ubuntu-nginx -t ghcr.io/joshuasing/lancache-ubuntu-nginx --push .
cd ..
- name: "Build and push lancachenet/generic"
run: |
git clone https://github.com/lancachenet/generic.git
cd generic
sed -i '1cFROM joshuasing/lancache-ubuntu-nginx' Dockerfile
cat Dockerfile
docker buildx build --platform linux/arm/v7,linux/arm64 -t joshuasing/lancache-generic -t ghcr.io/joshuasing/lancache-generic --push .
cd ..
- name: "Build and push lancachenet/monolithic"
run: |
git clone https://github.com/lancachenet/monolithic.git
cd monolithic
sed -i '1cFROM joshuasing/lancache-generic' Dockerfile
cat Dockerfile
cp ../20_cache.conf overlay/etc/nginx/sites-available/cache.conf.d/root/20_cache.conf
docker buildx build --platform linux/arm/v7,linux/arm64 -t joshuasing/lancache-monolithic -t ghcr.io/joshuasing/lancache-monolithic --push .
cd ..
- name: "Build and push lancachenet/sniproxy"
run: |
git clone https://github.com/lancachenet/sniproxy.git
cd sniproxy
docker buildx build --platform linux/arm/v7,linux/arm64 -t joshuasing/lancache-sniproxy -t ghcr.io/joshuasing/lancache-sniproxy --push .
cd ..
- name: "Build and push lancachenet/lancache-dns"
run: |
git clone https://github.com/lancachenet/lancache-dns.git
cd lancache-dns
sed -i '1cFROM joshuasing/lancache-ubuntu' Dockerfile
cat Dockerfile
docker buildx build --platform linux/arm/v7,linux/arm64 -t joshuasing/lancache-dns -t ghcr.io/joshuasing/lancache-dns --push .
cd ..