From fe2ef2616c480bc87e3dd1cd78f679f9677f9b6c Mon Sep 17 00:00:00 2001 From: Roshan Khatri <117414976+roshkhatri@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:32:40 -0800 Subject: [PATCH] Workflow changes to fix old release binaries (#1461) - Moves `build-config.json` to workflow dir to build old versions with new configs. - Enables contributors to test release Wf on private repo by adding `github.event_name == 'workflow_dispatch' ||` --------- Signed-off-by: Roshan Khatri --- .github/actions/generate-package-build-matrix/action.yml | 4 ++-- .../generate-package-build-matrix}/build-config.json | 0 .github/workflows/build-release-packages.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename {utils/releasetools => .github/actions/generate-package-build-matrix}/build-config.json (100%) diff --git a/.github/actions/generate-package-build-matrix/action.yml b/.github/actions/generate-package-build-matrix/action.yml index 7e90f27be..2494a7111 100644 --- a/.github/actions/generate-package-build-matrix/action.yml +++ b/.github/actions/generate-package-build-matrix/action.yml @@ -24,11 +24,11 @@ runs: - name: Get targets run: | - x86_arch=$(jq -c '[.linux_targets[] | select(.arch=="x86_64")]' utils/releasetools/build-config.json) + x86_arch=$(jq -c '[.linux_targets[] | select(.arch=="x86_64")]' .github/actions/generate-package-build-matrix/build-config.json) x86_matrix=$(echo "{ \"distro\" : $x86_arch }" | jq -c .) echo "X86_MATRIX=$x86_matrix" >> $GITHUB_ENV - arm_arch=$(jq -c '[.linux_targets[] | select(.arch=="arm64")]' utils/releasetools/build-config.json) + arm_arch=$(jq -c '[.linux_targets[] | select(.arch=="arm64")]' .github/actions/generate-package-build-matrix/build-config.json) arm_matrix=$(echo "{ \"distro\" : $arm_arch }" | jq -c .) echo "ARM_MATRIX=$arm_matrix" >> $GITHUB_ENV shell: bash diff --git a/utils/releasetools/build-config.json b/.github/actions/generate-package-build-matrix/build-config.json similarity index 100% rename from utils/releasetools/build-config.json rename to .github/actions/generate-package-build-matrix/build-config.json diff --git a/.github/workflows/build-release-packages.yml b/.github/workflows/build-release-packages.yml index 3f1ca2627..d7ab8e57d 100644 --- a/.github/workflows/build-release-packages.yml +++ b/.github/workflows/build-release-packages.yml @@ -8,7 +8,7 @@ on: - '.github/workflows/build-release-packages.yml' - '.github/workflows/call-build-linux-arm-packages.yml' - '.github/workflows/call-build-linux-x86-packages.yml' - - 'utils/releasetools/build-config.json' + - '.github/actions/generate-package-build-matrix/build-config.json' workflow_dispatch: inputs: version: @@ -23,7 +23,7 @@ jobs: # This job provides the version metadata from the tag for the other jobs to use. release-build-get-meta: name: Get metadata to build - if: github.repository == 'valkey-io/valkey' + if: github.event_name == 'workflow_dispatch' || github.repository == 'valkey-io/valkey' runs-on: ubuntu-latest outputs: version: ${{ steps.get_version.outputs.VERSION }} @@ -69,7 +69,7 @@ jobs: generate-build-matrix: name: Generating build matrix - if: github.repository == 'valkey-io/valkey' + if: github.event_name == 'workflow_dispatch' || github.repository == 'valkey-io/valkey' runs-on: ubuntu-latest outputs: x86_64-build-matrix: ${{ steps.set-matrix.outputs.x86_64-build-matrix }}