From 14442c6193f83c1e793c4554fbc4dd6f1467c835 Mon Sep 17 00:00:00 2001 From: Krzysztof Durek <21038648+kdurek@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:00:28 +0200 Subject: [PATCH] feat: split builds --- .github/workflows/canary.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/canary.yml diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml new file mode 100644 index 000000000..94f0b0615 --- /dev/null +++ b/.github/workflows/canary.yml @@ -0,0 +1,57 @@ +name: Canary + +on: + push: + branches: + - canary + +jobs: + build-amd64-and-push: + runs-on: ubuntu-latest + steps: + - name: Check out the code + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Prepare .env file + run: | + cp .env.production.example .env.production + + - name: Build image and push to registry + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + platforms: linux/amd64 + push: true + tags: canary + + build-arm64-and-push: + runs-on: ubuntu-latest + steps: + - name: Check out the code + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Prepare .env file + run: | + cp .env.production.example .env.production + + - name: Build image and push to registry + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + platforms: linux/arm64 + push: true + tags: canary