From b44762d157ac1949ad934d239cb18588f17673a6 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 24 Aug 2021 09:38:35 -0600 Subject: [PATCH] Split buildx action into main and dev builds Since Docker Hub no longer allows automated builds for free tier users, the build process for new images needs to be moved to GitHub Actions. The existing buildx workflow has worked pretty well for the most part, but was only enabled for the develop branch and only pushed the buildx-experimental tag. This addition allows pushes to the main branch to build updates for the "latest" tag as well, which is more commonly used I think. --- .../workflows/{buildx.yml => buildx-dev.yml} | 0 .github/workflows/buildx-main.yml | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+) rename .github/workflows/{buildx.yml => buildx-dev.yml} (100%) create mode 100644 .github/workflows/buildx-main.yml diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx-dev.yml similarity index 100% rename from .github/workflows/buildx.yml rename to .github/workflows/buildx-dev.yml diff --git a/.github/workflows/buildx-main.yml b/.github/workflows/buildx-main.yml new file mode 100644 index 0000000..0bfd5c4 --- /dev/null +++ b/.github/workflows/buildx-main.yml @@ -0,0 +1,28 @@ +name: buildx + +on: + push: + branches: main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v2 + - name: install buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + - name: log in to docker hub + run: | + echo "${{ secrets.DOCKER_PASSWORD }}" | \ + docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + - name: build and push the image + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx ls + docker buildx build --push \ + --tag benbusby/whoogle-search:latest \ + --platform linux/amd64,linux/arm/v7,linux/arm64 .