From 51c2a615b142dc79c66812f2d413a5032dc41a90 Mon Sep 17 00:00:00 2001 From: Alexander Richards Date: Wed, 18 Oct 2023 10:46:27 +0100 Subject: [PATCH 1/4] add build check to push and PR --- .github/workflows/docker-image.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c23f63e..7a8f856 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,6 +1,10 @@ name: Docker Image CI on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] release: types: [released] From 3d9e57cde85fce72dc99f743a6a7977339368f31 Mon Sep 17 00:00:00 2001 From: Alexander Richards Date: Wed, 18 Oct 2023 11:00:10 +0100 Subject: [PATCH 2/4] create separate build test for push and PR --- .github/workflows/build-test.yml | 26 ++++++++++++++++++++++++++ .github/workflows/docker-image.yml | 6 +----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..6666049 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,26 @@ +name: CI build test workflow + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + tags: alexanderrichards/dirac_ui:7.3.26 + build-args: | + dirac_version=7.3.26 \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7a8f856..f957f17 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,10 +1,6 @@ -name: Docker Image CI +name: CD release build and publish on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] release: types: [released] From 8fb80d34dbe73b6ae7424ed52381a9b4e207d6cc Mon Sep 17 00:00:00 2001 From: Alexander Richards Date: Wed, 18 Oct 2023 11:01:26 +0100 Subject: [PATCH 3/4] rename release workflow --- .github/workflows/{docker-image.yml => release-build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{docker-image.yml => release-build.yml} (100%) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/release-build.yml similarity index 100% rename from .github/workflows/docker-image.yml rename to .github/workflows/release-build.yml From c7f385bf04683e545c9d4dbf21284dd13dac766f Mon Sep 17 00:00:00 2001 From: Alexander Richards Date: Wed, 18 Oct 2023 11:13:59 +0100 Subject: [PATCH 4/4] remove arm64 build --- .github/workflows/build-test.yml | 2 +- .github/workflows/release-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6666049..62ff123 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -20,7 +20,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 tags: alexanderrichards/dirac_ui:7.3.26 build-args: | dirac_version=7.3.26 \ No newline at end of file diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index f957f17..2835c80 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -24,7 +24,7 @@ jobs: with: # push: true context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 tags: alexanderrichards/dirac_ui:${{ github.event.release.tag_name }},alexanderrichards/dirac_ui:latest build-args: | dirac_version=${{ github.event.release.tag_name }}