File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: pre-commit
22
33permissions :
44 contents : read
5+ statuses : write
56
67on :
78 pull_request :
Original file line number Diff line number Diff line change 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
1620jobs :
1721 add_jira_summary :
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
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
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
Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff line change 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 :
Original file line number Diff line number Diff line change 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
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
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 :
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments