diff --git a/.github/workflows/jira_ci.yml b/.github/workflows/jira_ci.yml index d0d640f4b..bfd171443 100644 --- a/.github/workflows/jira_ci.yml +++ b/.github/workflows/jira_ci.yml @@ -3,6 +3,12 @@ name: ci # runs only after tox workflow finished successfully on: workflow_dispatch: + inputs: + ref: + type: string + description: 'Ref (SHA/branch) to run the workflow on' + required: true + default: 'main' workflow_run: workflows: [tox] branches: [main] @@ -12,7 +18,9 @@ on: jobs: server: uses: ./.github/workflows/jira_server_ci.yml - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} + with: + ref: ${{ github.event.inputs.ref || 'main' }} cloud: needs: server @@ -22,6 +30,8 @@ jobs: CLOUD_ADMIN_TOKEN: ${{ secrets.CI_JIRA_CLOUD_ADMIN_TOKEN }} CLOUD_USER: ${{ secrets.CI_JIRA_CLOUD_USER }} CLOUD_USER_TOKEN: ${{ secrets.CI_JIRA_CLOUD_USER_TOKEN }} + with: + ref: ${{ github.event.inputs.ref || 'main' }} # 'check' the only job that should be marked as required in # repository config, so we do not need to change required jobs diff --git a/.github/workflows/jira_cloud_ci.yml b/.github/workflows/jira_cloud_ci.yml index 8d6aadf34..d7545cf7e 100644 --- a/.github/workflows/jira_cloud_ci.yml +++ b/.github/workflows/jira_cloud_ci.yml @@ -2,6 +2,12 @@ name: cloud on: workflow_call: + inputs: + ref: + type: string + description: 'Ref (SHA/branch) to run the workflow on' + required: true + default: 'main' secrets: CLOUD_ADMIN: required: true @@ -12,7 +18,12 @@ on: CLOUD_USER_TOKEN: required: true workflow_dispatch: - + inputs: + ref: + type: string + description: 'Ref (SHA/branch) to run the workflow on' + required: true + default: 'main' jobs: test: environment: cloud @@ -27,6 +38,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 diff --git a/.github/workflows/jira_server_ci.yml b/.github/workflows/jira_server_ci.yml index 4b6c84725..355b11f42 100644 --- a/.github/workflows/jira_server_ci.yml +++ b/.github/workflows/jira_server_ci.yml @@ -2,8 +2,19 @@ name: server on: workflow_call: + inputs: + ref: + type: string + description: 'Ref (SHA/branch) to run the workflow on' + required: true + default: 'main' workflow_dispatch: - + inputs: + ref: + type: string + description: 'Ref (SHA/branch) to run the workflow on' + required: true + default: 'main' jobs: test: name: py${{ matrix.python-version }}-jira${{ matrix.jira-version }} @@ -16,6 +27,9 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.ref }} + - name: Start Jira docker instance run: docker run -dit -p 2990:2990 --name jira addono/jira-software-standalone --version ${{ matrix.jira-version }}