From 7ba37f19a05bcb0dd003c8cb67c500a6b6703e1d Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 14 Jul 2024 04:22:56 +0000 Subject: [PATCH 1/4] Run CI on PR --- .github/workflows/{push-image.yml => build-and-publish.yml} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename .github/workflows/{push-image.yml => build-and-publish.yml} (97%) diff --git a/.github/workflows/push-image.yml b/.github/workflows/build-and-publish.yml similarity index 97% rename from .github/workflows/push-image.yml rename to .github/workflows/build-and-publish.yml index 77e6c4c..7e8936d 100644 --- a/.github/workflows/push-image.yml +++ b/.github/workflows/build-and-publish.yml @@ -1,4 +1,4 @@ -name: Create and publish Packages +name: Build and publish Images/Packages on: push: @@ -6,6 +6,8 @@ on: - main tags: - "v*.*.*" + pull_request: + - main env: IMAGE_NAME: ${{ github.repository }} From 8ad92a264f1f7d0ac356a6220d77dffcc34511bb Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 14 Jul 2024 04:24:08 +0000 Subject: [PATCH 2/4] Fix indent --- .github/workflows/build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 7e8936d..2973e66 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -6,8 +6,8 @@ on: - main tags: - "v*.*.*" - pull_request: - - main + pull_request: + - main env: IMAGE_NAME: ${{ github.repository }} From a3d37fd2822fda4b16d67954da2b071ef57cb1dd Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 14 Jul 2024 04:24:32 +0000 Subject: [PATCH 3/4] Fix syntax --- .github/workflows/build-and-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 2973e66..86a50ea 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -7,7 +7,8 @@ on: tags: - "v*.*.*" pull_request: - - main + branches: + - main env: IMAGE_NAME: ${{ github.repository }} From b477bd7dc14db4bc9475a5392829e16f1591699b Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sun, 14 Jul 2024 04:25:55 +0000 Subject: [PATCH 4/4] Add concurrency control --- .github/workflows/build-and-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 86a50ea..95f9480 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -10,6 +10,8 @@ on: branches: - main +concurrency: build_and_publish_concurrency_group-${{ github.event.pull_request.number || github.ref_name }} + env: IMAGE_NAME: ${{ github.repository }} IMAGE_REGISTRY: ghcr.io