diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 1bbdc2ba57..a71bf10411 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -84,7 +84,7 @@ jobs: - name: Build id: build - uses: docker/bake-action@v3 + uses: docker/bake-action@v4 with: pull: true load: ${{!fromJson(needs.prepare.outputs.push)}} diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index ad115c792b..ccb37f45d5 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -35,21 +35,30 @@ jobs: uses: docker/setup-buildx-action@v2 with: version: latest + - + name: Login to DockerHub + if: ${{toJson(startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request'))}} + uses: docker/login-action@v2 + with: + username: ${{secrets.REGISTRY_USERNAME}} + password: ${{secrets.REGISTRY_PASSWORD}} - name: Build id: build - uses: docker/bake-action@v3 + uses: docker/bake-action@v4 with: pull: true load: true + push: ${{toJson(startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request'))}} targets: static-builder set: | *.cache-from=type=gha,scope=${{github.ref}}-static-builder *.cache-from=type=gha,scope=refs/heads/main-static-builder *.cache-to=type=gha,scope=${{github.ref}}-static-builder env: - VERSION: ${{github.ref_type == 'tag' && github.ref_name || github.sha}} + LATEST: '1' # TODO: unset this variable when releasing the first stable version SHA: ${{github.sha}} + VERSION: ${{github.ref_type == 'tag' && github.ref_name || github.sha}} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Copy binary diff --git a/build-static.sh b/build-static.sh index 7b7723b3cb..e914d49e9b 100755 --- a/build-static.sh +++ b/build-static.sh @@ -1,7 +1,6 @@ #!/bin/sh set -o errexit -set -o xtrace if ! type "git" > /dev/null; then echo "The \"git\" command must be installed."