From 0c3aa68737a2336304c437686fa6aecf856c1145 Mon Sep 17 00:00:00 2001 From: Aleksandr Borovskii Date: Wed, 25 Nov 2026 11:16:50 +0100 Subject: [PATCH 1/3] ci: set an explicit PATH for job containers rockylinux:9 now resolves to the KIWI-built 9.9 image, whose config sets no PATH. The runner prepends tool paths (e.g. from setup-node) to the container's PATH, so after setup-node the step PATH holds only the Node.js directory and every `shell: bash` step fails with `exec: "bash": executable file not found in $PATH`. Pass the standard PATH via container.env in the e2e `executables` and `npm` jobs, and in `generate-binary` so the Linux executable build does not break the same way if redhat/ubi8 drops PATH. Matrix entries without a container keep running on the host: the runner treats an empty container image as no container. --- .github/workflows/deploy.yml | 7 ++++++- .github/workflows/test-cli.yml | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4739190a..697d2924 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -98,7 +98,12 @@ jobs: image: redhat/ubi8 options: "--user root" runs-on: ${{ matrix.os }} - container: ${{ matrix.container }} + container: + image: ${{ matrix.container.image }} + options: ${{ matrix.container.options }} + # An image without PATH in its config (e.g. rockylinux:9 9.9+) makes bash unfindable after setup-node. + env: + PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml index 7666fadb..6ca60248 100644 --- a/.github/workflows/test-cli.yml +++ b/.github/workflows/test-cli.yml @@ -60,7 +60,11 @@ jobs: needs: resolve-version if: ${{ inputs.test_executables }} runs-on: ${{ matrix.os }} - container: ${{ matrix.container }} + container: + image: ${{ matrix.container }} + # rockylinux:9 (9.9+) sets no PATH in its image config; without it, bash isn't found after setup-node. + env: + PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true @@ -250,7 +254,11 @@ jobs: needs: resolve-version if: ${{ inputs.test_npm }} runs-on: ${{ matrix.os }} - container: ${{ matrix.container }} + container: + image: ${{ matrix.container }} + # rockylinux:9 (9.9+) sets no PATH in its image config; without it, bash isn't found after setup-node. + env: + PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin env: ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true From 1d96066aa4f7471039aedec2af41ecfcba62ee3a Mon Sep 17 00:00:00 2001 From: Aleksandr Borovskii Date: Wed, 25 Nov 2026 15:45:19 +0100 Subject: [PATCH 2/3] ci: temporarily verify generate-binary on push Runs deploy.yml's build and generate-binary steps without publishing, to exercise the new container block. To be removed before merge. --- .../workflows/tmp-verify-generate-binary.yml | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .github/workflows/tmp-verify-generate-binary.yml diff --git a/.github/workflows/tmp-verify-generate-binary.yml b/.github/workflows/tmp-verify-generate-binary.yml new file mode 100644 index 00000000..6ccd5ab2 --- /dev/null +++ b/.github/workflows/tmp-verify-generate-binary.yml @@ -0,0 +1,113 @@ +# TEMPORARY: exercises deploy.yml's build + generate-binary without publishing. +# Delete before merging. +name: Verify generate-binary (temporary) + +on: + push: + branches: [ci/container-default-path] + workflow_dispatch: + +permissions: + contents: read + +env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install deps + uses: ./.github/workflows/composite/npm + + - name: Set default distribution + run: npm pkg set brightCli.distribution=package + + - name: Build package + run: npm run build + + - uses: actions/upload-artifact@v4 + with: + name: build + retention-days: 1 + path: | + dist + Dockerfile + package.json + package-lock.json + README.md + LICENSE + tools + + # Keep strategy, runs-on and container identical to deploy.yml's generate-binary. + generate-binary: + needs: build + strategy: + fail-fast: false + matrix: + include: + - os: windows-2022 + target: win + - os: macos-15 + target: macos + - os: ubuntu-22.04 + target: linux + container: + image: redhat/ubi8 + options: "--user root" + runs-on: ${{ matrix.os }} + container: + image: ${{ matrix.container.image }} + options: ${{ matrix.container.options }} + env: + PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + name: build + + - name: Install dev-deps + if: startsWith(matrix.os, 'ubuntu') + run: | + dnf install -y dnf-utils \ + && dnf install -y python3 gcc gcc-c++ make \ + && rm -rf /var/cache/dnf + + - name: Install deps + uses: ./.github/workflows/composite/npm + + - name: Set distribution + run: npx json -I -f package.json -e "this.brightCli.distribution='${{ matrix.target }}-executable'" + + - name: Build executable file + run: npm run build:pkg -- -t node24-${{ matrix.target }}-x64 + + - name: Set Windows version info + if: startsWith(matrix.os, 'win') + run: node .\tools\scripts\set-windows-version-info.mjs .\bin\cli.exe + + # Unsigned: code signing would spend DigiCert KeyLocker quota on a throwaway build. + - name: Build MSI + if: startsWith(matrix.os, 'win') + run: .\tools\scripts\build-msi.ps1 + + - name: Run executable + shell: bash + run: ./bin/cli${{ startsWith(matrix.os, 'win') && '.exe' || '' }} version + + - name: Calculate checksum + shell: bash + run: | + if [[ "${{ matrix.os }}" == "windows-2022" ]]; then + certutil -hashfile ./bin/cli.exe SHA256 | grep -v "CertUtil" | sed 's/SHA256 hash of .*://' | tr -d " \t\n\r" > checksum.txt + certutil -hashfile ./bin/bright-cli.msi SHA256 | grep -v "CertUtil" | sed 's/SHA256 hash of .*://' | tr -d " \t\n\r" > checksum.msi.txt + elif [[ "${{ matrix.os }}" == "macos-15" ]]; then + shasum -a 256 ./bin/cli | cut -d' ' -f1 > checksum.txt + else + sha256sum ./bin/cli | cut -d' ' -f1 > checksum.txt + fi + cat checksum.txt From 0e2715997cada4e8110e060ab4221c86e723f320 Mon Sep 17 00:00:00 2001 From: Aleksandr Borovskii Date: Wed, 25 Nov 2026 16:12:31 +0100 Subject: [PATCH 3/3] ci: drop the temporary generate-binary check --- .../workflows/tmp-verify-generate-binary.yml | 113 ------------------ 1 file changed, 113 deletions(-) delete mode 100644 .github/workflows/tmp-verify-generate-binary.yml diff --git a/.github/workflows/tmp-verify-generate-binary.yml b/.github/workflows/tmp-verify-generate-binary.yml deleted file mode 100644 index 6ccd5ab2..00000000 --- a/.github/workflows/tmp-verify-generate-binary.yml +++ /dev/null @@ -1,113 +0,0 @@ -# TEMPORARY: exercises deploy.yml's build + generate-binary without publishing. -# Delete before merging. -name: Verify generate-binary (temporary) - -on: - push: - branches: [ci/container-default-path] - workflow_dispatch: - -permissions: - contents: read - -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install deps - uses: ./.github/workflows/composite/npm - - - name: Set default distribution - run: npm pkg set brightCli.distribution=package - - - name: Build package - run: npm run build - - - uses: actions/upload-artifact@v4 - with: - name: build - retention-days: 1 - path: | - dist - Dockerfile - package.json - package-lock.json - README.md - LICENSE - tools - - # Keep strategy, runs-on and container identical to deploy.yml's generate-binary. - generate-binary: - needs: build - strategy: - fail-fast: false - matrix: - include: - - os: windows-2022 - target: win - - os: macos-15 - target: macos - - os: ubuntu-22.04 - target: linux - container: - image: redhat/ubi8 - options: "--user root" - runs-on: ${{ matrix.os }} - container: - image: ${{ matrix.container.image }} - options: ${{ matrix.container.options }} - env: - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - steps: - - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v4 - with: - name: build - - - name: Install dev-deps - if: startsWith(matrix.os, 'ubuntu') - run: | - dnf install -y dnf-utils \ - && dnf install -y python3 gcc gcc-c++ make \ - && rm -rf /var/cache/dnf - - - name: Install deps - uses: ./.github/workflows/composite/npm - - - name: Set distribution - run: npx json -I -f package.json -e "this.brightCli.distribution='${{ matrix.target }}-executable'" - - - name: Build executable file - run: npm run build:pkg -- -t node24-${{ matrix.target }}-x64 - - - name: Set Windows version info - if: startsWith(matrix.os, 'win') - run: node .\tools\scripts\set-windows-version-info.mjs .\bin\cli.exe - - # Unsigned: code signing would spend DigiCert KeyLocker quota on a throwaway build. - - name: Build MSI - if: startsWith(matrix.os, 'win') - run: .\tools\scripts\build-msi.ps1 - - - name: Run executable - shell: bash - run: ./bin/cli${{ startsWith(matrix.os, 'win') && '.exe' || '' }} version - - - name: Calculate checksum - shell: bash - run: | - if [[ "${{ matrix.os }}" == "windows-2022" ]]; then - certutil -hashfile ./bin/cli.exe SHA256 | grep -v "CertUtil" | sed 's/SHA256 hash of .*://' | tr -d " \t\n\r" > checksum.txt - certutil -hashfile ./bin/bright-cli.msi SHA256 | grep -v "CertUtil" | sed 's/SHA256 hash of .*://' | tr -d " \t\n\r" > checksum.msi.txt - elif [[ "${{ matrix.os }}" == "macos-15" ]]; then - shasum -a 256 ./bin/cli | cut -d' ' -f1 > checksum.txt - else - sha256sum ./bin/cli | cut -d' ' -f1 > checksum.txt - fi - cat checksum.txt