Skip to content

Commit

Permalink
Merge pull request #3122 from valkey-io/ephemeral_label
Browse files Browse the repository at this point in the history
Avoid using ephemeral runners in publishing workflows since ephemeral runners are new feature and using them during the release can complicate the process.
  • Loading branch information
ikolomi authored Feb 11, 2025
2 parents 468150a + 8518254 commit 3df20a5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/go-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Get the matrix from the matrix.json file, without the object that has the IMAGE key
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS | contains(["pkg_go_dev"])))' < .github/json_matrices/build-matrix.json | jq -c .)"
# Filter entries with pkg_go_dev in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pkg_go_dev"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
validate-release-version:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Get the matrix from the matrix.json file, without the object that has the IMAGE key
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS | contains(["maven"])))' < .github/json_matrices/build-matrix.json | jq -c .)"
# Filter entries with maven in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["maven"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
set-release-version:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,16 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Get the matrix from the matrix.json file, without the object that has the IMAGE key
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["npm"]))))' < .github/json_matrices/build-matrix.json | jq -c .)"
# Filter entries with npm in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["npm"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
publish-binaries:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Get the matrix from the matrix.json file, without the object that has the IMAGE key
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pypi"]))))' < .github/json_matrices/build-matrix.json | jq -c .)"
# Filter entries with pypi in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pypi"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
start-self-hosted-runner:
Expand Down

0 comments on commit 3df20a5

Please sign in to comment.