From 578437bfeba1bf4c27cc9fbf5e07a7ac11037897 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Mon, 12 Sep 2022 18:53:49 -0600 Subject: [PATCH] CI: add GitHub Actions CI to build images --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ Dockerfile | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3ef87f0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: 'Yuzu Rooms Docker Image CI' + +on: + push: + branches: [ "*" ] + tags: [ "*" ] + pull_request: + branches: [ master ] + workflow_dispatch: + inputs: {} + schedule: + - cron: '0 7 * * 0' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - 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: Login to DockerHub + uses: docker/login-action@v1 + if: (github.ref == 'refs/heads/master') && (github.repository == 'yuzu-emu/yuzu-multiplayer-dedicated') + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build Image + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm64 + push: ${{ (github.ref == 'refs/heads/master') && (github.repository == 'yuzu-emu/yuzu-multiplayer-dedicated') }} + tags: yuzuemu/yuzu-multiplayer-dedicated:latest diff --git a/Dockerfile b/Dockerfile index 2fcc06d..488806c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get -y full-upgrade && \ COPY . /root/build-files RUN --mount=type=cache,id=ccache,target=/root/.ccache \ - git clone --depth 1000 --recursive https://github.com/yuzu-emu/yuzu-mainline.git /root/yuzu-mainline && \ + git clone --depth 1000 -j4 --recursive https://github.com/yuzu-emu/yuzu-mainline.git /root/yuzu-mainline && \ cd /root/yuzu-mainline && /root/build-files/.ci/build.sh FROM gcr.io/distroless/cc-debian11 AS final