From 2c288eeeeab9a88dc0bb43afa9dc7450130d0704 Mon Sep 17 00:00:00 2001 From: glax Date: Thu, 20 Jul 2023 23:54:30 +0200 Subject: [PATCH] Don't rebuild tranga-base every time. --- .github/workflows/docker-base.yml | 43 ++++++++++++++++++++++++++++++ .github/workflows/docker-image.yml | 13 --------- 2 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/docker-base.yml diff --git a/.github/workflows/docker-base.yml b/.github/workflows/docker-base.yml new file mode 100644 index 0000000..50346db --- /dev/null +++ b/.github/workflows/docker-base.yml @@ -0,0 +1,43 @@ +name: Docker Image CI + +on: + workflow_dispatch: + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + # https://github.com/docker/setup-qemu-action#usage + - name: Set up QEMU + uses: docker/setup-qemu-action@v2.2.0 + + # https://github.com/marketplace/actions/docker-setup-buildx + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2.9.1 + + # https://github.com/docker/login-action#docker-hub + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # https://github.com/docker/build-push-action#multi-platform-image + - name: Build and push base + uses: docker/build-push-action@v4.1.1 + with: + context: ./ + file: ./Dockerfile-base + #platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm/v7,linux/arm64 + pull: true + push: true + tags: | + glax/tranga-base:latest \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2d83fb0..1af1a70 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -33,19 +33,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # https://github.com/docker/build-push-action#multi-platform-image - - name: Build and push base - uses: docker/build-push-action@v4.1.1 - with: - context: ./ - file: ./Dockerfile-base - #platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 - platforms: linux/amd64,linux/arm/v7,linux/arm64 - pull: true - push: true - tags: | - glax/tranga-base:latest - # https://github.com/docker/build-push-action#multi-platform-image - name: Build and push API uses: docker/build-push-action@v4.1.1