From 566c124e4c352fb74d981c730ccf22ec03be4d4c Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 21 Oct 2024 10:45:20 +0100 Subject: [PATCH] Allow tox workflow to receive an optional environment argument --- .github/workflows/tox.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 00b5451..81a5cae 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -9,6 +9,11 @@ on: description: Default python version for other jobs required: false type: string + environment: + default: "" + description: Which GHA environment to use + required: false + type: string jobs_producing_coverage: default: 6 description: Number of jobs producing coverage.xml files @@ -58,6 +63,7 @@ jobs: prepare: name: prepare runs-on: ubuntu-24.04 + environment: ${{ inputs.environment }} outputs: matrix: ${{ steps.generate_matrix.outputs.matrix }} steps: @@ -76,6 +82,7 @@ jobs: test: name: ${{ matrix.name }} runs-on: ${{ matrix.os || 'ubuntu-24.04' }} + environment: ${{ inputs.environment }} needs: - prepare defaults: @@ -158,6 +165,7 @@ jobs: # https://github.com/actions/toolkit/issues/193 check: if: always() + environment: ${{ inputs.environment }} permissions: pull-requests: write # allow codenotify to comment on pull-request id-token: write