From 1990831d296d855388a5102877a97160b4639dbe Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Mon, 21 Oct 2024 18:53:32 -0400 Subject: [PATCH 01/13] speed up arch build --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94bc6b9..9835399 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ on: push: tags: - v* + branches: + - lk/speedup-arm-build permissions: contents: write @@ -40,7 +42,7 @@ jobs: build-docker-image: name: Build Docker image - runs-on: ubuntu-latest + runs-on: ubuntu-latest-l-${{matrix.arch}} strategy: fail-fast: true matrix: @@ -120,6 +122,7 @@ jobs: run: rm -f .git-credentials merge-push-docker-image: + if: ${{ startsWith(github.ref, 'refs/tags') }} ## REMOVE BEFORE MERGE name: Merge and push Docker image runs-on: ubuntu-latest needs: build-docker-image From 82fd35f611f2e49951f5f77e4aa56e925c9450d5 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 07:52:46 -0400 Subject: [PATCH 02/13] reduce tags, fix buildx image path --- .github/workflows/release.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9835399..c7234b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,9 +84,6 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{raw}} - type=raw,value=latest-nightly,enable=${{ contains(github.ref, '-nightly') }} - type=semver,pattern=v{{major}}.{{minor}},enable=${{ !contains(github.ref, '-nightly') }} - type=semver,pattern=v{{major}},enable=${{ !contains(github.ref, '-nightly') && !startsWith(github.ref, 'refs/tags/v0.') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator @@ -129,6 +126,8 @@ jobs: permissions: contents: read packages: write + attestations: write + id-token: write env: REGISTRY: ghcr.io steps: @@ -154,9 +153,6 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{raw}} - type=raw,value=latest-nightly,enable=${{ contains(github.ref, '-nightly') }} - type=semver,pattern=v{{major}}.{{minor}},enable=${{ !contains(github.ref, '-nightly') }} - type=semver,pattern=v{{major}},enable=${{ !contains(github.ref, '-nightly') && !startsWith(github.ref, 'refs/tags/v0.') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator @@ -174,7 +170,7 @@ jobs: working-directory: /tmp/digests run: | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *) + $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) - name: Inspect image run: | From 2878203c056b9405b52da2b859f779059028975c Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 08:05:38 -0400 Subject: [PATCH 03/13] remove constraint --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7234b7..37d3824 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: build-docker-image: name: Build Docker image - runs-on: ubuntu-latest-l-${{matrix.arch}} + runs-on: ubuntu-latest strategy: fail-fast: true matrix: From 65d34aa3cfe84be1665398821fc98d2a0791f939 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 08:16:56 -0400 Subject: [PATCH 04/13] tweak the tags --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37d3824..40461dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,8 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=semver,pattern={{raw}} + type=semver,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} + type=raw,value=${{ github.ref }},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator @@ -152,7 +153,8 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=semver,pattern={{raw}} + type=semver,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} + type=raw,value=${{ github.ref }},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator From b2f3b455f8c3ab960c2f12363e7e73ed467e08c8 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 08:39:33 -0400 Subject: [PATCH 05/13] fix ref --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40461dc..8f91b6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,7 +84,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} - type=raw,value=${{ github.ref }},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} + type=raw,value={{sha}},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator @@ -154,7 +154,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} - type=raw,value=${{ github.ref }},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} + type=raw,value={{sha}},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator From 37700e2074933ae8a55d0b94f9d101624fc8bae0 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 08:40:02 -0400 Subject: [PATCH 06/13] allow for merge --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f91b6c..6ec08fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,7 +120,7 @@ jobs: run: rm -f .git-credentials merge-push-docker-image: - if: ${{ startsWith(github.ref, 'refs/tags') }} ## REMOVE BEFORE MERGE + # if: ${{ startsWith(github.ref, 'refs/tags') }} ## REMOVE BEFORE MERGE name: Merge and push Docker image runs-on: ubuntu-latest needs: build-docker-image From c0bad4cf93c6017818925be9763d19ddc829d697 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 09:06:50 -0400 Subject: [PATCH 07/13] cleanup --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ec08fc..5b62c39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,6 @@ on: push: tags: - v* - branches: - - lk/speedup-arm-build permissions: contents: write @@ -84,7 +82,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} - type=raw,value={{sha}},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} + type=sha,prefix=,value={{sha}},format=long,enable=${{ !startsWith(github.ref, 'refs/tags/v') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator @@ -120,7 +118,7 @@ jobs: run: rm -f .git-credentials merge-push-docker-image: - # if: ${{ startsWith(github.ref, 'refs/tags') }} ## REMOVE BEFORE MERGE + if: ${{ startsWith(github.ref, 'refs/tags') }} name: Merge and push Docker image runs-on: ubuntu-latest needs: build-docker-image @@ -154,7 +152,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=semver,pattern={{raw}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} - type=raw,value={{sha}},enable=${{ !startsWith(github.ref, 'refs/tags/v') }} + type=sha,prefix=,value={{sha}},format=long,enable=${{ !startsWith(github.ref, 'refs/tags/v') }} labels: | maintainer=ConduitIO org.opencontainers.image.title=Conduit-Operator From 0d669ba5f54914cb7f38b0b22b2693932828e98d Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 09:09:22 -0400 Subject: [PATCH 08/13] enable arm runners --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b62c39..1ac6918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: build-docker-image: name: Build Docker image - runs-on: ubuntu-latest + runs-on: ubuntu-latest-l-${{ matrix.arch }} strategy: fail-fast: true matrix: @@ -125,8 +125,6 @@ jobs: permissions: contents: read packages: write - attestations: write - id-token: write env: REGISTRY: ghcr.io steps: From 97c5d69f5a997e1c377a84f2889b5ba9bfbb226b Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 09:10:41 -0400 Subject: [PATCH 09/13] branches --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ac6918..d499c4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ on: push: tags: - v* + branches: + - lk/speedup-arm-build permissions: contents: write From d0b2c92f687e342c10b8ab8e5cb66fa06d541152 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 09:18:24 -0400 Subject: [PATCH 10/13] name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d499c4d..9081d2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: build-docker-image: name: Build Docker image - runs-on: ubuntu-latest-l-${{ matrix.arch }} + runs-on: "ubuntu-latest-l-${{matrix.arch}}" strategy: fail-fast: true matrix: From d7c5d4598ac4a4619e5dd893c54cd92d8e6fab33 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 09:28:22 -0400 Subject: [PATCH 11/13] reset --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9081d2f..5c01943 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,8 @@ on: push: tags: - v* - branches: - - lk/speedup-arm-build +# branches: +# - lk/speedup-arm-build permissions: contents: write From 49f93ebb9ada558bd295e2fb4ef23d63443ef192 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 09:28:43 -0400 Subject: [PATCH 12/13] back to branch --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c01943..9081d2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,8 @@ on: push: tags: - v* -# branches: -# - lk/speedup-arm-build + branches: + - lk/speedup-arm-build permissions: contents: write From a7f7738ae52e2b10d6ef84894b8c3b2c553779a8 Mon Sep 17 00:00:00 2001 From: Lyubo Kamenov Date: Tue, 22 Oct 2024 11:20:48 -0400 Subject: [PATCH 13/13] remove branch --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9081d2f..c3515a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,6 @@ on: push: tags: - v* - branches: - - lk/speedup-arm-build permissions: contents: write