diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index af1d932039..a49b9b9736 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -5,8 +5,8 @@ inputs: force_skip_tests: description: 'Whether to force skip the tests.' required: false - type: 'boolean' - default: false + type: 'string' + default: 'false' gemini_api_key: description: 'The API key for running integration tests.' required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e95d76623..db7c6188cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,12 @@ on: - 'release/**' merge_group: workflow_dispatch: + inputs: + branch_ref: + description: 'Branch to run on' + required: true + default: 'main' + type: 'string' concurrency: group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' @@ -34,6 +40,7 @@ jobs: - name: 'Checkout' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' fetch-depth: 1 - name: 'Set up Node.js' @@ -143,7 +150,7 @@ jobs: - '24.x' steps: - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@vv5 - name: 'Set up Node.js ${{ matrix.node-version }}' uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 @@ -201,6 +208,8 @@ jobs: steps: - name: 'Checkout' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' - name: 'Initialize CodeQL' uses: 'github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2' # ratchet:github/codeql-action/init@v3 @@ -223,6 +232,7 @@ jobs: - name: 'Checkout' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' fetch-depth: 1 - uses: 'preactjs/compressed-size-action@946a292cd35bd1088e0d7eb92b69d1a8d5b5d76a' @@ -240,7 +250,9 @@ jobs: steps: - name: 'Checkout' - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + uses: 'actions/checkout@08c6903cd8c0fde910a3f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' - name: 'Set up Node.js 20.x' uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e95cdcdc96..bba4869fc0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,6 +13,13 @@ on: pull_request_target: types: ['labeled'] merge_group: + workflow_dispatch: + inputs: + branch_ref: + description: 'Branch to run on' + required: true + default: 'main' + type: 'string' concurrency: group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' @@ -31,6 +38,8 @@ jobs: steps: - name: 'Checkout' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' - name: 'Set up Node.js' uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4 @@ -83,6 +92,8 @@ jobs: - name: 'Checkout (internal)' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 if: "github.event_name != 'pull_request_target'" + with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' - name: 'Download build artifacts' uses: 'actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093' @@ -131,10 +142,9 @@ jobs: fail-fast: false matrix: os: - - 'macos-latest' + - 'macos-12' node-version: - '20.x' - steps: - name: 'Checkout (fork)' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 @@ -146,6 +156,8 @@ jobs: - name: 'Checkout (internal)' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 if: "github.event_name != 'pull_request_target'" + with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' - name: 'Download build artifacts' uses: 'actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093' @@ -197,6 +209,8 @@ jobs: - name: 'Checkout (internal)' uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 if: "github.event_name != 'pull_request_target'" + with: + ref: '${{ github.event.inputs.branch_ref || github.ref }}' - name: 'Set up Node.js 20.x' uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions-node@v4 diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml index 6056e562cb..8bfdd74140 100644 --- a/.github/workflows/release-manual.yml +++ b/.github/workflows/release-manual.yml @@ -51,6 +51,9 @@ jobs: ref: '${{ github.event.inputs.ref }}' fetch-depth: 0 + - name: 'Debug Inputs' + run: 'echo "${{ toJSON(inputs) }}"' + - name: 'Setup Node.js' uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' with: @@ -68,10 +71,9 @@ jobs: echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0)" >> "${GITHUB_OUTPUT}" - name: 'Run Tests' - if: |- - ${{ github.event.inputs.force_skip_tests != true }} uses: './.github/actions/run-tests' with: + force_skip_tests: '${{ github.event.inputs.force_skip_tests }}' gemini_api_key: '${{ secrets.GEMINI_API_KEY }}' - name: 'Publish Release'