diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 99c9e37..7398050 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,11 @@ jobs: with: persist-credentials: false + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + version: "v0.10.4" + - name: Setup Node.js uses: actions/setup-node@v3 with: diff --git a/.releaserc.yml b/.releaserc.yml index 80c823a..9c66e0f 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -12,10 +12,14 @@ plugins: - - "@semantic-release/exec" - prepareCmd: | # Build Docker Container - docker build \ + # Build now but dont push; this validates that the image builds + # successfully and we can later re-use the cached build results to + # push in "publish" stage + docker buildx build \ -t apricote/listory \ --build-arg VERSION=${nextRelease.version} \ --build-arg GIT_COMMIT=`git rev-parse HEAD` \ + --platform=linux/amd64,linux/arm64 \ . # Update version in Helm Chart @@ -35,8 +39,16 @@ plugins: -e "s/apricote\/listory:.*/apricote\/listory:${nextRelease.version}/g" \ docker-compose.prod.yml - - - semantic-release-docker - - name: apricote/listory + publishCmd: | + # Build (with cache) & push Docker Images + docker buildx build \ + -t apricote/listory:${nextRelease.version} \ + -t apricote/listory:latest \ + --build-arg VERSION=${nextRelease.version} \ + --build-arg GIT_COMMIT=`git rev-parse HEAD` \ + --platform=linux/amd64,linux/arm64 \ + --push \ + - - "@semantic-release/git" - assets: - CHANGELOG.md