Skip to content

Commit

Permalink
push the static-builder tag to the Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Dec 2, 2023
1 parent da6ff52 commit 4dc62f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)}}
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion build-static.sh
Original file line number Diff line number Diff line change
@@ -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."
Expand Down

0 comments on commit 4dc62f2

Please sign in to comment.