From e2a3bd00ccd5918560f2dc3d7d66087992722b65 Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:15:09 +0200 Subject: [PATCH 1/4] Create docker-buildx-bake-build.yml --- .../workflows/docker-buildx-bake-build.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/docker-buildx-bake-build.yml diff --git a/.github/workflows/docker-buildx-bake-build.yml b/.github/workflows/docker-buildx-bake-build.yml new file mode 100644 index 0000000..952e75c --- /dev/null +++ b/.github/workflows/docker-buildx-bake-build.yml @@ -0,0 +1,33 @@ +name: Docker Compose Build + +on: + push: + branches: + - main # Change this to your main branch name + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up QEMU + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + + - name: Login to Docker Hub (if needed) + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and Push Docker Compose Services + run: | + docker buildx bake -f docker-compose.yml + docker buildx bake -f docker-compose.yml --push + #env: + # COMPOSE_FILE: docker-compose.yml From 1bbbb9ac79eddb9e535850a6a9a38fb9869435f4 Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:17:02 +0200 Subject: [PATCH 2/4] update --- .github/workflows/docker-buildx-bake-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-buildx-bake-build.yml b/.github/workflows/docker-buildx-bake-build.yml index 952e75c..02ddcc4 100644 --- a/.github/workflows/docker-buildx-bake-build.yml +++ b/.github/workflows/docker-buildx-bake-build.yml @@ -16,11 +16,11 @@ jobs: - name: Set up QEMU run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - - name: Login to Docker Hub (if needed) - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + # - name: Login to Docker Hub (if needed) + # uses: docker/login-action@v1 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 From 52b2a50782c0f7a3f280dc3b63a30227d481bed8 Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:18:18 +0200 Subject: [PATCH 3/4] update --- .github/workflows/docker-buildx-bake-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-buildx-bake-build.yml b/.github/workflows/docker-buildx-bake-build.yml index 02ddcc4..770342d 100644 --- a/.github/workflows/docker-buildx-bake-build.yml +++ b/.github/workflows/docker-buildx-bake-build.yml @@ -27,7 +27,7 @@ jobs: - name: Build and Push Docker Compose Services run: | - docker buildx bake -f docker-compose.yml + docker buildx bake --push docker buildx bake -f docker-compose.yml --push #env: # COMPOSE_FILE: docker-compose.yml From d073520fc99acb0bf7106318d353524cd45668ea Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:26:35 +0200 Subject: [PATCH 4/4] update --- .github/workflows/docker-buildx-bake-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-buildx-bake-build.yml b/.github/workflows/docker-buildx-bake-build.yml index 770342d..4ab02f3 100644 --- a/.github/workflows/docker-buildx-bake-build.yml +++ b/.github/workflows/docker-buildx-bake-build.yml @@ -25,6 +25,9 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Login to GitHub Container Registry + run: echo ${{ secrets.GHCR_PAT }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + - name: Build and Push Docker Compose Services run: | docker buildx bake --push