Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/python_deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
workflow_dispatch:
inputs:
release-tag:
description: 'Tag for the existing (draft) release to publish assets from'
required: true
description: 'Tag for the release to publish assets from (defaults to the tag this workflow run was triggered from)'
required: false
publish-conda:
description: 'Publish Conda package'
required: false
Expand All @@ -26,29 +26,44 @@
cancel-in-progress: true

jobs:
validate-release-tag:
name: Validate release tag
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Ensure a release tag is resolvable
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && \
[ -z "${{ github.event.inputs.release-tag }}" ] && \

Check failure on line 37 in .github/workflows/python_deploy_prod.yml

View workflow job for this annotation

GitHub Actions / Zizmor analysis (annotate) / Security Scan

template-injection

python_deploy_prod.yml:37: code injection via template expansion: may expand into attacker-controllable code
[ "${{ github.ref_type }}" != "tag" ]; then

Check failure on line 38 in .github/workflows/python_deploy_prod.yml

View workflow job for this annotation

GitHub Actions / Zizmor analysis (annotate) / Security Scan

template-injection

python_deploy_prod.yml:38: code injection via template expansion: may expand into attacker-controllable code
Comment on lines +34 to +38
echo "::error::No 'release-tag' input was provided, and this run was not triggered from a tag (ref_type=${{ github.ref_type }}, ref_name=${{ github.ref_name }}). Re-run this workflow selecting the release tag under 'Use workflow from', or provide 'release-tag' manually."

Check failure on line 39 in .github/workflows/python_deploy_prod.yml

View workflow job for this annotation

GitHub Actions / Zizmor analysis (annotate) / Security Scan

template-injection

python_deploy_prod.yml:39: code injection via template expansion: may expand into attacker-controllable code

Check failure on line 39 in .github/workflows/python_deploy_prod.yml

View workflow job for this annotation

GitHub Actions / Zizmor analysis (annotate) / Security Scan

template-injection

python_deploy_prod.yml:39: code injection via template expansion: may expand into attacker-controllable code
exit 1
fi
call-workflow-conda-release:
name: Publish production Conda package on JFrog Artifactory
needs: validate-release-tag
if: ${{ github.event_name == 'release' || github.event.inputs.publish-conda == 'true' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_conda_assets.yml@v3
permissions:
contents: write
with:
virtual-repo-names: '["public-noremote-conda-prod"]'
release-tag: ${{ github.event.release.tag_name || github.event.inputs.release-tag }}
release-tag: ${{ github.event.release.tag_name || github.event.inputs.release-tag || github.ref_name }}
secrets:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
call-workflow-pypi-release:
name: Publish production PyPI package (JFrog Artifactory, PyPI)
needs: validate-release-tag
if: ${{ github.event_name == 'release' || github.event.inputs.publish-pypi == 'true' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_pypi_assets.yml@v3
permissions:
contents: write
with:
package-name: 'mira-simpeg'
virtual-repo-names: '["public-pypi-prod", "pypi"]'
release-tag: ${{ github.event.release.tag_name || github.event.inputs.release-tag }}
release-tag: ${{ github.event.release.tag_name || github.event.inputs.release-tag || github.ref_name }}
secrets:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Loading