Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Dec 1, 2023
1 parent a3c3637 commit 28a8fb3
Show file tree
Hide file tree
Showing 5 changed files with 710 additions and 676 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
name: Create variants matrix
id: matrix
run: |
METADATA=$(docker buildx bake --print | jq -c)
echo "metadata=$METADATA" >> "$GITHUB_OUTPUT"
echo "variants=$(jq -c '.group.default.targets|map(sub("runner-|builder-"; ""))|unique' <<< $METADATA)" >> "$GITHUB_OUTPUT"
echo "platforms=$(jq -c 'first(.target[]) | .platforms' <<< $METADATA)" >> "$GITHUB_OUTPUT"
METADATA="$(docker buildx bake --print | jq -c)"
{
echo "metadata=$METADATA"
echo "variants=$(jq -c '.group.default.targets|map(sub("runner-|builder-"; ""))|unique' <<< $METADATA)"
echo "platforms=$(jq -c 'first(.target[]) | .platforms' <<< $METADATA)"
} >> "$GITHUB_OUTPUT"
env:
LATEST: '1' # TODO: unset this variable when releasing the first stable version
SHA: ${{github.sha}}
Expand Down Expand Up @@ -107,10 +109,10 @@ jobs:
run: |
mkdir -p /tmp/metadata/builder /tmp/metadata/runner
builderDigest=$(jq -r '."builder-${{matrix.variant}}"."containerimage.digest"' <<< $METADATA)
builderDigest="$(jq -r '."builder-${{matrix.variant}}"."containerimage.digest"' <<< $METADATA)"
touch "/tmp/metadata/builder/${builderDigest#sha256:}"
runnerDigest=$(jq -r '."runner-${{matrix.variant}}"."containerimage.digest"' <<< $METADATA)
runnerDigest="$(jq -r '."runner-${{matrix.variant}}"."containerimage.digest"' <<< $METADATA)"
touch "/tmp/metadata/runner/${runnerDigest#sha256:}"
env:
METADATA: ${{steps.build.outputs.metadata}}
Expand Down Expand Up @@ -138,7 +140,7 @@ jobs:
continue-on-error: ${{fromJson(needs.prepare.outputs.push)}}
run: |
docker run --platform=${{matrix.platform}} --rm \
$(jq -r '."builder-${{matrix.variant}}"."containerimage.config.digest"' <<< $METADATA) \
"$(jq -r '."builder-${{matrix.variant}}"."containerimage.config.digest"' <<< $METADATA)" \
sh -c 'go test ${{matrix.race}} -v ./... && cd caddy && go test ${{matrix.race}} -v ./...'
env:
METADATA: ${{steps.build.outputs.metadata}}
Expand Down Expand Up @@ -176,13 +178,13 @@ jobs:
name: Create manifest list and push
working-directory: /tmp/metadata
run: |
docker buildx imagetools create $(jq -cr '.target."${{matrix.target}}-${{matrix.variant}}".tags | map("-t " + .) | join(" ")' <<< $METADATA) \
$(printf 'dunglas/frankenphp@sha256:%s ' *)
docker buildx imagetools create "$(jq -cr '.target."${{matrix.target}}-${{matrix.variant}}".tags | map("-t " + .) | join(" ")' <<< $METADATA)" \
"$(printf 'dunglas/frankenphp@sha256:%s ' *)"
env:
METADATA: ${{needs.prepare.outputs.metadata}}
-
name: Inspect image
run: |
docker buildx imagetools inspect $(jq -cr '.target."${{matrix.target}}-${{matrix.variant}}".tags | first' <<< $METADATA)
docker buildx imagetools inspect '$(jq -cr '.target."${{matrix.target}}-${{matrix.variant}}".tags | first' <<< $METADATA)"
env:
METADATA: ${{needs.prepare.outputs.metadata}}
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ jobs:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
FILTER_REGEX_EXCLUDE: '.*C-Thread-Pool/.*'
VALIDATE_JSCPD: false
VALIDATE_GO: false
VALIDATE_PHP_PHPCS: false
VALIDATE_PHP_PHPSTAN: false
VALIDATE_PHP_PSALM: false
VALIDATE_TERRAGRUNT: false
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
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
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
-
name: Upload asset
if: github.ref_type == 'tag'
Expand Down
Loading

0 comments on commit 28a8fb3

Please sign in to comment.