Skip to content

Commit

Permalink
speed up arch build (#45)
Browse files Browse the repository at this point in the history
* speed up arch build
  • Loading branch information
lyuboxa authored Oct 22, 2024
1 parent 51e6268 commit 08394ab
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -81,10 +81,8 @@ jobs:
with:
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.') }}
type=semver,pattern={{raw}},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
Expand Down Expand Up @@ -120,6 +118,7 @@ jobs:
run: rm -f .git-credentials

merge-push-docker-image:
if: ${{ startsWith(github.ref, 'refs/tags') }}
name: Merge and push Docker image
runs-on: ubuntu-latest
needs: build-docker-image
Expand Down Expand Up @@ -150,10 +149,8 @@ jobs:
with:
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.') }}
type=semver,pattern={{raw}},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
Expand All @@ -171,7 +168,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: |
Expand Down

0 comments on commit 08394ab

Please sign in to comment.