Skip to content

Commit b4518d2

Browse files
committed
fmt(ci): consistently use fromJSON instead of fromJson in github actions
1 parent 97618cc commit b4518d2

9 files changed

+30
-30
lines changed

.github/workflows/_build-and-test-locally.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ env:
3939

4040
jobs:
4141
build-neon:
42-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.arch == 'arm64' && 'large-arm64' || 'large')) }}
42+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', inputs.arch == 'arm64' && 'large-arm64' || 'large')) }}
4343
permissions:
4444
id-token: write # aws-actions/configure-aws-credentials
4545
contents: read
@@ -318,7 +318,7 @@ jobs:
318318
contents: read
319319
statuses: write
320320
needs: [ build-neon ]
321-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', inputs.arch == 'arm64' && 'large-arm64' || 'large')) }}
321+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', inputs.arch == 'arm64' && 'large-arm64' || 'large')) }}
322322
container:
323323
image: ${{ inputs.build-tools-image }}
324324
credentials:

.github/workflows/_check-codestyle-rust.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
check-codestyle-rust:
2424
strategy:
2525
matrix:
26-
arch: ${{ fromJson(inputs.archs) }}
27-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}
26+
arch: ${{ fromJSON(inputs.archs) }}
27+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}
2828

2929
container:
3030
image: ${{ inputs.build-tools-image }}

.github/workflows/_meta.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
121121
- name: Get the release PR run ID
122122
id: release-pr-run-id
123-
if: ${{ contains(fromJson('["storage-release", "compute-release", "proxy-release"]'), steps.run-kind.outputs.run-kind) }}
123+
if: ${{ contains(fromJSON('["storage-release", "compute-release", "proxy-release"]'), steps.run-kind.outputs.run-kind) }}
124124
env:
125125
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126126
CURRENT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}

.github/workflows/benchmarking.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ jobs:
441441

442442
strategy:
443443
fail-fast: false
444-
matrix: ${{fromJson(needs.generate-matrices.outputs.pgbench-compare-matrix)}}
444+
matrix: ${{fromJSON(needs.generate-matrices.outputs.pgbench-compare-matrix)}}
445445

446446
env:
447447
TEST_PG_BENCH_DURATIONS_MATRIX: "60m"
@@ -483,7 +483,7 @@ jobs:
483483
aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}
484484

485485
- name: Create Neon Project
486-
if: contains(fromJson('["neonvm-captest-new", "neonvm-captest-new-many-tables", "neonvm-captest-freetier", "neonvm-azure-captest-freetier", "neonvm-azure-captest-new"]'), matrix.platform)
486+
if: contains(fromJSON('["neonvm-captest-new", "neonvm-captest-new-many-tables", "neonvm-captest-freetier", "neonvm-azure-captest-freetier", "neonvm-azure-captest-new"]'), matrix.platform)
487487
id: create-neon-project
488488
uses: ./.github/actions/neon-project-create
489489
with:
@@ -523,7 +523,7 @@ jobs:
523523
# without (neonvm-captest-new)
524524
# and with (neonvm-captest-new-many-tables) many relations in the database
525525
- name: Create many relations before the run
526-
if: contains(fromJson('["neonvm-captest-new-many-tables"]'), matrix.platform)
526+
if: contains(fromJSON('["neonvm-captest-new-many-tables"]'), matrix.platform)
527527
uses: ./.github/actions/run-python-test-set
528528
with:
529529
build_type: ${{ env.BUILD_TYPE }}
@@ -753,7 +753,7 @@ jobs:
753753

754754
strategy:
755755
fail-fast: false
756-
matrix: ${{ fromJson(needs.generate-matrices.outputs.olap-compare-matrix) }}
756+
matrix: ${{ fromJSON(needs.generate-matrices.outputs.olap-compare-matrix) }}
757757

758758
env:
759759
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
@@ -880,7 +880,7 @@ jobs:
880880

881881
strategy:
882882
fail-fast: false
883-
matrix: ${{ fromJson(needs.generate-matrices.outputs.tpch-compare-matrix) }}
883+
matrix: ${{ fromJSON(needs.generate-matrices.outputs.tpch-compare-matrix) }}
884884

885885
env:
886886
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install
@@ -999,7 +999,7 @@ jobs:
999999

10001000
strategy:
10011001
fail-fast: false
1002-
matrix: ${{ fromJson(needs.generate-matrices.outputs.olap-compare-matrix) }}
1002+
matrix: ${{ fromJSON(needs.generate-matrices.outputs.olap-compare-matrix) }}
10031003

10041004
env:
10051005
POSTGRES_DISTRIB_DIR: /tmp/neon/pg_install

.github/workflows/build-build-tools-image.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ jobs:
7070
env:
7171
IMAGE_TAG: ${{ steps.set-variables.outputs.image-tag }}
7272
EVERYTHING: |
73-
${{ contains(fromJson(steps.set-variables.outputs.archs), 'x64') &&
74-
contains(fromJson(steps.set-variables.outputs.archs), 'arm64') &&
75-
contains(fromJson(steps.set-variables.outputs.debians), 'bullseye') &&
76-
contains(fromJson(steps.set-variables.outputs.debians), 'bookworm') }}
73+
${{ contains(fromJSON(steps.set-variables.outputs.archs), 'x64') &&
74+
contains(fromJSON(steps.set-variables.outputs.archs), 'arm64') &&
75+
contains(fromJSON(steps.set-variables.outputs.debians), 'bullseye') &&
76+
contains(fromJSON(steps.set-variables.outputs.debians), 'bookworm') }}
7777
run: |
7878
if docker manifest inspect neondatabase/build-tools:${IMAGE_TAG}; then
7979
found=true
@@ -90,10 +90,10 @@ jobs:
9090

9191
strategy:
9292
matrix:
93-
arch: ${{ fromJson(needs.check-image.outputs.archs) }}
94-
debian: ${{ fromJson(needs.check-image.outputs.debians) }}
93+
arch: ${{ fromJSON(needs.check-image.outputs.archs) }}
94+
debian: ${{ fromJSON(needs.check-image.outputs.debians) }}
9595

96-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
96+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
9797

9898
steps:
9999
- uses: actions/checkout@v4
@@ -141,8 +141,8 @@ jobs:
141141
- name: Create multi-arch image
142142
env:
143143
DEFAULT_DEBIAN_VERSION: bookworm
144-
ARCHS: ${{ join(fromJson(needs.check-image.outputs.archs), ' ') }}
145-
DEBIANS: ${{ join(fromJson(needs.check-image.outputs.debians), ' ') }}
144+
ARCHS: ${{ join(fromJSON(needs.check-image.outputs.archs), ' ') }}
145+
DEBIANS: ${{ join(fromJSON(needs.check-image.outputs.debians), ' ') }}
146146
EVERYTHING: ${{ needs.check-image.outputs.everything }}
147147
IMAGE_TAG: ${{ needs.check-image.outputs.tag }}
148148
run: |

.github/workflows/build-macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: macos-15
4141
strategy:
4242
matrix:
43-
postgres-version: ${{ inputs.rebuild_everything && fromJson('["v14", "v15", "v16", "v17"]') || fromJSON(inputs.pg_versions) }}
43+
postgres-version: ${{ inputs.rebuild_everything && fromJSON('["v14", "v15", "v16", "v17"]') || fromJSON(inputs.pg_versions) }}
4444
env:
4545
# Use release build only, to have less debug info around
4646
# Hence keeping target/ (and general cache size) smaller

.github/workflows/build_and_test.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ jobs:
184184
matrix:
185185
arch: [ x64, arm64 ]
186186
# Do not build or run tests in debug for release branches
187-
build-type: ${{ fromJson((startsWith(github.ref_name, 'release') && github.event_name == 'push') && '["release"]' || '["debug", "release"]') }}
187+
build-type: ${{ fromJSON((startsWith(github.ref_name, 'release') && github.event_name == 'push') && '["release"]' || '["debug", "release"]') }}
188188
include:
189189
- build-type: release
190190
arch: arm64
@@ -504,7 +504,7 @@ jobs:
504504
matrix:
505505
arch: [ x64, arm64 ]
506506

507-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
507+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
508508

509509
steps:
510510
- uses: actions/checkout@v4
@@ -594,7 +594,7 @@ jobs:
594594
debian: bookworm
595595
arch: [ x64, arm64 ]
596596

597-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
597+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
598598

599599
steps:
600600
- uses: actions/checkout@v4
@@ -707,7 +707,7 @@ jobs:
707707
vm-compute-node-image-arch:
708708
needs: [ check-permissions, meta, compute-node-image ]
709709
if: ${{ contains(fromJSON('["push-main", "pr", "compute-rc-pr"]'), needs.meta.outputs.run-kind) }}
710-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
710+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
711711
strategy:
712712
fail-fast: false
713713
matrix:
@@ -797,7 +797,7 @@ jobs:
797797
arch: [ x64, arm64 ]
798798
pg_version: [v16, v17]
799799

800-
runs-on: ${{ fromJson(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}
800+
runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}
801801

802802
steps:
803803
- uses: actions/checkout@v4
@@ -904,7 +904,7 @@ jobs:
904904
env:
905905
SOURCE_TAG: >-
906906
${{
907-
contains(fromJson('["storage-release", "compute-release", "proxy-release"]'), needs.meta.outputs.run-kind)
907+
contains(fromJSON('["storage-release", "compute-release", "proxy-release"]'), needs.meta.outputs.run-kind)
908908
&& needs.meta.outputs.release-pr-run-id
909909
|| needs.meta.outputs.build-tag
910910
}}

.github/workflows/neon_extra_builds.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ jobs:
7171
uses: ./.github/workflows/build-macos.yml
7272
with:
7373
pg_versions: ${{ needs.files-changed.outputs.postgres_changes }}
74-
rebuild_rust_code: ${{ fromJson(needs.files-changed.outputs.rebuild_rust_code) }}
75-
rebuild_everything: ${{ fromJson(needs.files-changed.outputs.rebuild_everything) }}
74+
rebuild_rust_code: ${{ fromJSON(needs.files-changed.outputs.rebuild_rust_code) }}
75+
rebuild_everything: ${{ fromJSON(needs.files-changed.outputs.rebuild_everything) }}
7676

7777
gather-rust-build-stats:
7878
needs: [ check-permissions, build-build-tools-image, files-changed ]

.github/workflows/pre-merge-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
${{
149149
always()
150150
&& github.event_name == 'merge_group'
151-
&& contains(fromJson('["release", "release-proxy", "release-compute"]'), needs.meta.outputs.branch)
151+
&& contains(fromJSON('["release", "release-proxy", "release-compute"]'), needs.meta.outputs.branch)
152152
}}
153153
env:
154154
GH_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)