Skip to content

Commit 149daaf

Browse files
authored
Merge branch 'main' into DEVOPS-545-poetry-autoversioning
2 parents 1ce9e43 + e32b5ba commit 149daaf

9 files changed

Lines changed: 65 additions & 23 deletions

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: pre-commit
22

33
permissions:
44
contents: read
5+
statuses: write
56

67
on:
78
pull_request:

.github/workflows/reusable-jira-pr_add_jira_summary.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ on:
99
JIRA_BASE_URL:
1010
required: true
1111
description: 'The base URL of your JIRA instance'
12-
JIRA_BASIC_AUTH:
12+
JIRA_USER_EMAIL:
1313
required: true
14-
description: 'The base64-encoded username:password for your JIRA instance'
14+
description: 'The email address for your JIRA account'
15+
JIRA_API_TOKEN:
16+
required: true
17+
description: 'The API token for your JIRA account'
18+
1519

1620
jobs:
1721
add_jira_summary:
@@ -20,7 +24,9 @@ jobs:
2024
env:
2125
JIRA_PATTERN: "([A-Z]+)[-# ]*([0-9]+)"
2226
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
23-
JIRA_BASIC_AUTH: ${{ secrets.JIRA_BASIC_AUTH }}
27+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
28+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
29+
2430
steps:
2531

2632
- name: Find JIRA issue key from branch
@@ -39,7 +45,7 @@ jobs:
3945
id: jira_summary_from_branch
4046
run: >
4147
curl -sS -X GET
42-
-H "Authorization: Basic $JIRA_BASIC_AUTH"
48+
-u "${JIRA_USER_EMAIL}:${JIRA_API_TOKEN}"
4349
-H "Content-Type: application/json"
4450
"$JIRA_BASE_URL/rest/api/2/issue/${{ steps.jira_key_from_branch.outputs.issue_key }}"
4551
| echo "summary=$(jq -r '.fields.summary // empty' | xargs)" >> $GITHUB_OUTPUT
@@ -61,7 +67,7 @@ jobs:
6167
id: jira_summary_from_title
6268
run: >
6369
curl -sS -X GET
64-
-H "Authorization: Basic $JIRA_BASIC_AUTH"
70+
-u "${JIRA_USER_EMAIL}:${JIRA_API_TOKEN}"
6571
-H "Content-Type: application/json"
6672
"$JIRA_BASE_URL/rest/api/2/issue/${{ steps.jira_key_from_title.outputs.issue_key }}"
6773
| echo "summary=$(jq -r '.fields.summary // empty' | xargs)" >> $GITHUB_OUTPUT

.github/workflows/reusable-pre_commit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
required: false
1818
type: string
1919
default: "3.10"
20+
lfs:
21+
description: 'Boolean to indicate if Github LFS is needed'
22+
required: false
23+
type: boolean
24+
default: false
2025
timeout-minutes:
2126
description: 'Timeout in minutes for the job'
2227
required: false
@@ -50,6 +55,7 @@ jobs:
5055
echo "base-depth=$depth" >> $GITHUB_OUTPUT
5156
- uses: actions/checkout@v4
5257
with:
58+
lfs: ${{ inputs.lfs }}
5359
# for non PR events, check out to depth 1 (the default)
5460
fetch-depth: ${{ steps.base-depth.outputs.base-depth || 1}}
5561
- name: Fetch target branch

.github/workflows/reusable-python-build_poetry_package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ on:
1616
description: 'Python version to use (e.g. 3.10)'
1717
required: true
1818
type: string
19-
lfs:
20-
description: 'Boolean to indicate if Github LFS is needed'
21-
required: false
22-
type: boolean
23-
default: false
2419
version-tag:
2520
description: 'Version tag of the package to build'
2621
required: true
@@ -33,6 +28,11 @@ on:
3328
description: 'OS to build against (e.g. "ubuntu-latest")'
3429
required: true
3530
type: string
31+
lfs:
32+
description: 'Boolean to indicate if Github LFS is needed'
33+
required: false
34+
type: boolean
35+
default: false
3636
timeout-minutes:
3737
description: 'Timeout in minutes for the job'
3838
required: true

.github/workflows/reusable-python-build_setuptools_package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ on:
1111
description: 'Python version to use (e.g. 3.10)'
1212
required: true
1313
type: string
14-
lfs:
15-
description: 'Boolean to indicate if Github LFS is needed'
16-
required: false
17-
type: boolean
18-
default: false
1914
version-tag:
2015
description: 'Version tag of the package to build'
2116
required: true
@@ -28,6 +23,11 @@ on:
2823
description: 'OS to build against (e.g. "ubuntu-latest")'
2924
required: true
3025
type: string
26+
lfs:
27+
description: 'Boolean to indicate if Github LFS is needed'
28+
required: false
29+
type: boolean
30+
default: false
3131
timeout-minutes:
3232
description: 'Timeout in minutes for the job'
3333
required: true

.github/workflows/reusable-python-publish_rattler_package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ on:
1111
description: 'Python version to use (e.g. 3.10)'
1212
required: true
1313
type: string
14-
lfs:
15-
description: 'Boolean to indicate if Github LFS is needed'
16-
required: false
17-
type: boolean
18-
default: true
1914
conda-channels:
2015
description: 'List of conda channels to pull from (e.g. ["conda-forge", "pytorch"])'
2116
required: true
@@ -33,6 +28,11 @@ on:
3328
required: false
3429
type: string
3530
default: 'ubuntu-latest'
31+
lfs:
32+
description: 'Boolean to indicate if Github LFS is needed'
33+
required: false
34+
type: boolean
35+
default: true
3636
timeout-minutes:
3737
description: 'Timeout in minutes for the job'
3838
required: false

.github/workflows/reusable-python-pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
9696
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
9797

98-
- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_poetry@DEVOPS-545-poetry-autoversioning
98+
- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_poetry@main
9999
name: Setup poetry env
100100
if: ${{ inputs.package-manager == 'poetry' }}
101101
with:

.github/workflows/reusable-python-static_analysis.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ on:
2525
description: 'List of repository names to resolve on (e.g. ["public-dev-pypi"])'
2626
required: false
2727
type: string
28+
lfs:
29+
description: 'Boolean to indicate if Github LFS is needed'
30+
required: false
31+
type: boolean
32+
default: false
2833
timeout-minutes:
2934
description: 'Timeout in minutes for the job'
3035
required: false
@@ -61,7 +66,7 @@ jobs:
6166
steps:
6267
- uses: actions/checkout@v4
6368
with:
64-
lfs: false
69+
lfs: ${{ inputs.lfs }}
6570
fetch-depth: 0
6671
- name: Set up Python version
6772
uses: actions/setup-python@v5
@@ -76,7 +81,7 @@ jobs:
7681
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
7782
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
7883

79-
- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_poetry@DEVOPS-545-poetry-autoversioning
84+
- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_poetry@main
8085
name: Setup poetry env
8186
if: ${{ inputs.package-manager == 'poetry' }}
8287
with:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Zizmor analysis
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
zizmor:
8+
name: Security Scan
9+
if: ${{ (github.event_name != 'pull_request') || (github.event.pull_request.draft == false) }}
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
actions: read
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
20+
- name: Run Zizmor Security Scan
21+
continue-on-error: true
22+
uses: zizmorcore/zizmor-action@f52a838cfabf134edcbaa7c8b3677dde20045018
23+
with:
24+
advanced-security: false

0 commit comments

Comments
 (0)