Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
paths:
- "docker-bake.hcl"
- ".github/workflows/docker.yaml"
- "**cgo.go"
- "**Dockerfile"
- "**.c"
- "**.h"
- "**.sh"
- "**.stub.php"
push:
branches:
- main
Expand All @@ -36,6 +28,7 @@ env:
IMAGE_NAME: ${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.version) || startsWith(github.ref, 'refs/tags/')) && 'dunglas/frankenphp' || 'dunglas/frankenphp-dev' }}
jobs:
prepare:
if: "github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'CI: All jobs')"
runs-on: ubuntu-24.04
outputs:
# Push if it's a scheduled job, a tag, or if we're committing to the main branch
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,9 @@ concurrency:

on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
paths:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may still help save some CI time when merged on main etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think it should always run then, so you're (we're) warned before tagging a release that there's an issue with docker images or binary builds.

- "docker-bake.hcl"
- ".github/workflows/static.yaml"
- "**cgo.go"
- "**Dockerfile"
- "**.c"
- "**.h"
- "**.sh"
- "**.stub.php"
push:
branches:
- main
Expand All @@ -42,6 +34,7 @@ env:

jobs:
prepare:
if: "github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'CI: All jobs')"
runs-on: ubuntu-24.04
outputs:
push: ${{ toJson((steps.check.outputs.ref || (github.event_name == 'workflow_dispatch' && inputs.version) || startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')) && true || false) }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ concurrency:

on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
paths-ignore:
- "docs/**"
push:
branches:
- main
tags:
- v*.*.*
paths-ignore:
- "docs/**"
workflow_dispatch:
inputs:
#checkov:skip=CKV_GHA_7
Expand All @@ -32,6 +29,7 @@ permissions:
contents: read

env:
BUILD_RELEASE: "${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'CI: All jobs') }}"
GOTOOLCHAIN: local
GOTESTSUM_FORMAT: pkgname-and-test-fails
GOFLAGS: "-ldflags=-extldflags=-fuse-ld=lld -tags=nobadger,nomysql,nopgx"
Expand Down Expand Up @@ -143,6 +141,7 @@ jobs:
FRANKENPHP_VERSION: ${{ steps.version.outputs.version }}

- name: Embed Windows icon and metadata
if: env.BUILD_RELEASE == 'true'
working-directory: frankenphp\caddy\frankenphp
run: |
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
Expand Down Expand Up @@ -181,6 +180,7 @@ jobs:
FRANKENPHP_VERSION: ${{ steps.version.outputs.version }}

- name: Build FrankenPHP
if: env.BUILD_RELEASE == 'true'
run: |
$customVersion = "FrankenPHP $env:FRANKENPHP_VERSION PHP $env:PHP_VERSION Caddy"
go build -ldflags="-extldflags=-fuse-ld=lld -X 'github.com/caddyserver/caddy/v2.CustomVersion=$customVersion' -X 'github.com/caddyserver/caddy/v2.CustomBinaryName=frankenphp' -X 'github.com/caddyserver/caddy/v2/modules/caddyhttp.ServerHeader=FrankenPHP Caddy'"
Expand All @@ -189,6 +189,7 @@ jobs:
FRANKENPHP_VERSION: ${{ steps.version.outputs.version }}

- name: Create Directory
if: env.BUILD_RELEASE == 'true'
run: |
Copy-Item frankenphp\caddy\frankenphp\frankenphp.exe $env:DIR_NAME
Copy-Item watcher\libwatcher-c.dll $env:DIR_NAME
Expand All @@ -198,7 +199,7 @@ jobs:
Copy-Item frankenphp\vcpkg_installed\x64-windows\bin\pthreadVC3.dll $env:DIR_NAME

- name: Upload Artifact
if: ${{ !env.REF }}
if: env.BUILD_RELEASE == 'true' && !env.REF
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.DIR_NAME }}
Expand Down
Loading