Skip to content

Commit ea9948a

Browse files
committed
and with custom ref
1 parent 102e068 commit ea9948a

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

.github/workflows/jira_ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: ci
33
# runs only after tox workflow finished successfully
44
on:
55
workflow_dispatch:
6+
inputs:
7+
ref:
8+
type: string
9+
description: 'Ref (SHA/branch) to run the workflow on'
10+
required: true
11+
default: 'main'
612
workflow_run:
713
workflows: [tox]
814
branches: [main]
@@ -13,6 +19,8 @@ jobs:
1319
server:
1420
uses: ./.github/workflows/jira_server_ci.yml
1521
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
22+
with:
23+
ref: ${{ github.event.inputs.ref || 'main' }}
1624

1725
cloud:
1826
needs: server
@@ -22,6 +30,8 @@ jobs:
2230
CLOUD_ADMIN_TOKEN: ${{ secrets.CI_JIRA_CLOUD_ADMIN_TOKEN }}
2331
CLOUD_USER: ${{ secrets.CI_JIRA_CLOUD_USER }}
2432
CLOUD_USER_TOKEN: ${{ secrets.CI_JIRA_CLOUD_USER_TOKEN }}
33+
with:
34+
ref: ${{ github.event.inputs.ref || 'main' }}
2535

2636
# 'check' the only job that should be marked as required in
2737
# repository config, so we do not need to change required jobs

.github/workflows/jira_cloud_ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: cloud
22

33
on:
44
workflow_call:
5+
inputs:
6+
ref:
7+
type: string
8+
description: 'Ref (SHA/branch) to run the workflow on'
9+
required: true
10+
default: 'main'
511
secrets:
612
CLOUD_ADMIN:
713
required: true
@@ -12,7 +18,12 @@ on:
1218
CLOUD_USER_TOKEN:
1319
required: true
1420
workflow_dispatch:
15-
21+
inputs:
22+
ref:
23+
type: string
24+
description: 'Ref (SHA/branch) to run the workflow on'
25+
required: true
26+
default: 'main'
1627
jobs:
1728
test:
1829
environment: cloud
@@ -27,6 +38,8 @@ jobs:
2738

2839
steps:
2940
- uses: actions/checkout@v4
41+
with:
42+
ref: ${{ github.event.inputs.ref }}
3043

3144
- name: Set up Python ${{ matrix.python-version }}
3245
uses: actions/setup-python@v5

.github/workflows/jira_server_ci.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@ name: server
22

33
on:
44
workflow_call:
5+
inputs:
6+
ref:
7+
type: string
8+
description: 'Ref (SHA/branch) to run the workflow on'
9+
required: true
10+
default: 'main'
511
workflow_dispatch:
6-
12+
inputs:
13+
ref:
14+
type: string
15+
description: 'Ref (SHA/branch) to run the workflow on'
16+
required: true
17+
default: 'main'
718
jobs:
819
test:
920
name: py${{ matrix.python-version }}-jira${{ matrix.jira-version }}
@@ -16,6 +27,9 @@ jobs:
1627

1728
steps:
1829
- uses: actions/checkout@v4
30+
with:
31+
ref: ${{ github.event.inputs.ref }}
32+
1933
- name: Start Jira docker instance
2034
run: docker run -dit -p 2990:2990 --name jira addono/jira-software-standalone --version ${{ matrix.jira-version }}
2135

0 commit comments

Comments
 (0)