Skip to content

Commit 2e61ace

Browse files
authored
Merge pull request #106 from sebhmg/DEVOPS-825
DEVOPS-825: use token for shared JIRA workflows
2 parents 26cae9a + ddb860e commit 2e61ace

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/issue_to_jira.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
call-workflow-create-jira-issue:
13+
if: startsWith(github.repository, 'MiraGeoscience/') # run on the Mira repo only
1314
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-issue_to_jira.yml@main
1415
with:
1516
project-key: 'GEOPY'

.github/workflows/pr_add_jira_summary.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
call-workflow-add-jira-issue-summary:
13+
if: startsWith(github.repository, 'MiraGeoscience/') # run if PR targets the Mira repo only
1314
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_add_jira_summary.yml@main
1415
secrets:
1516
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Zizmor analysis
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
branches:
7+
- develop
8+
- main
9+
- release/**
10+
- feature/**
11+
- hotfix/**
12+
push:
13+
branches:
14+
- main
15+
- develop
16+
- feature/**
17+
- hotfix/**
18+
- release/**
19+
20+
jobs:
21+
call-workflow-zizmor:
22+
name: Zizmor analysis
23+
# run on the Mira repo only (upstream SimPEG repo has its own workflow for Zizmor)
24+
if: startsWith(github.repository, 'MiraGeoscience/')
25+
permissions:
26+
contents: read
27+
actions: read
28+
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-security.yml@main

.github/workflows/zizmor.yml renamed to .github/workflows/zizmor-security-upstream.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ permissions: {}
1313

1414
jobs:
1515
lint:
16+
# run only if not on the Mira repo (MiraGeoscience repo has its own workflow for Zizmor)
17+
if: ${{ !startsWith(github.repository, 'MiraGeoscience/') }}
1618
runs-on: ubuntu-latest
1719
steps:
1820
- name: Checkout

0 commit comments

Comments
 (0)