Skip to content

Commit d0b469c

Browse files
Merge pull request #19 from php/ci/yaml-style
Use block style lists and wrap if conditions in workflows
2 parents 95caf48 + 883e521 commit d0b469c

3 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎.github/workflows/agent-image.yml‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Agent image
22

33
on:
44
push:
5-
branches: [main]
6-
paths: ["docker/agent/**", ".github/workflows/agent-image.yml"]
5+
branches:
6+
- main
7+
paths:
8+
- "docker/agent/**"
9+
- ".github/workflows/agent-image.yml"
710
pull_request:
8-
paths: ["docker/agent/**", ".github/workflows/agent-image.yml"]
11+
paths:
12+
- "docker/agent/**"
13+
- ".github/workflows/agent-image.yml"
914
workflow_dispatch:
1015

1116
permissions:
@@ -21,15 +26,17 @@ jobs:
2126
attestations: write
2227
strategy:
2328
matrix:
24-
agent: [claude, codex]
29+
agent:
30+
- claude
31+
- codex
2532
steps:
2633
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2734
with:
2835
persist-credentials: false
2936
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
3037
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
3138
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
32-
if: github.event_name != 'pull_request'
39+
if: ${{ github.event_name != 'pull_request' }}
3340
with:
3441
registry: ghcr.io
3542
username: ${{ github.actor }}
@@ -46,7 +53,7 @@ jobs:
4653
ghcr.io/${{ github.repository }}-agent:${{ matrix.agent }}
4754
ghcr.io/${{ github.repository }}-agent:${{ matrix.agent }}-${{ github.sha }}
4855
- uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
49-
if: github.event_name != 'pull_request'
56+
if: ${{ github.event_name != 'pull_request' }}
5057
with:
5158
subject-name: ghcr.io/${{ github.repository }}-agent
5259
subject-digest: ${{ steps.push.outputs.digest }}
@@ -56,7 +63,7 @@ jobs:
5663
# through a reviewed pull request.
5764
pin:
5865
needs: image
59-
if: github.event_name != 'pull_request'
66+
if: ${{ github.event_name != 'pull_request' }}
6067
runs-on: ubuntu-latest
6168
permissions:
6269
contents: write

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: CI
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
78

89
permissions:
@@ -56,7 +57,9 @@ jobs:
5657
strategy:
5758
fail-fast: false
5859
matrix:
59-
agent: [claude, codex]
60+
agent:
61+
- claude
62+
- codex
6063
steps:
6164
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6265
with:

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Release
22

33
on:
44
push:
5-
tags: ["v[0-9]+.[0-9]+.[0-9]+.[0-9]+"]
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
67

78
permissions:
89
contents: read

0 commit comments

Comments
 (0)