Skip to content

Commit

Permalink
ci: fix static build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Dec 2, 2023
1 parent 6509cdd commit 8664f8f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: docker/bake-action@v4
with:
pull: true
load: true
load: ${{toJson(!startsWith(github.ref, 'refs/tags/') && (github.ref != 'refs/heads/main' || github.event_name == 'pull_request'))}}
push: ${{toJson(startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request'))}}
targets: static-builder
set: |
Expand All @@ -60,6 +60,10 @@ jobs:
SHA: ${{github.sha}}
VERSION: ${{github.ref_type == 'tag' && github.ref_name || github.sha}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Pull Docker image
if: ${{toJson(startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request'))}}
run: docker pull dunglas/frankenphp:static-builder
-
name: Copy binary
run: docker cp "$(docker create --name static-builder dunglas/frankenphp:static-builder):/go/src/app/dist/frankenphp-linux-x86_64" frankenphp-linux-x86_64 ; docker rm static-builder
Expand Down

0 comments on commit 8664f8f

Please sign in to comment.