-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pdm): detect libraries and JFrog support to avoid failures (#260)
- Loading branch information
1 parent
f977e87
commit 877f5c6
Showing
4 changed files
with
33 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,12 +52,18 @@ outputs: | |
has_backstage: | ||
description: Whether the project is exposing Backstage catalog infos | ||
value: ${{ steps.meta.outputs.has_backstage }} | ||
is_distribution: | ||
description: Whether the project is a distribution or not | ||
value: ${{ steps.meta.outputs.is_distribution }} | ||
is_pr: | ||
description: Is the current workflow run a pull-request | ||
value: ${{ steps.meta.outputs.is_pr }} | ||
branch: | ||
description: The branch from which workflow has been triggered | ||
value: ${{ steps.meta.outputs.branch }} | ||
has_jfrog: | ||
description: Whether this project uses JFrog Artifactory or not | ||
value: ${{ steps.detect-jfrog.outputs.has_jfrog }} | ||
jfrog-domain: | ||
description: Base domain of Ledger's JFrog platform if authenticated | ||
value: ${{ steps.jfrog-login.outputs.jfrog-domain }} | ||
|
@@ -88,9 +94,17 @@ runs: | |
git config user.email [email protected] | ||
shell: bash | ||
|
||
- name: detect-jfrog | ||
id: detect-jfrog | ||
run: | | ||
: Detect JFrog requirement | ||
HAS_JFROG=$(grep "jfrog" pyproject.toml > /dev/null && echo "true" || echo "false") | ||
echo "has_jfrog=${HAS_JFROG}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Authenticate against JFrog Artifactory | ||
id: jfrog-login | ||
if: env.JFROG_REPOSITORY | ||
if: steps.detect-jfrog.outputs.has_jfrog == 'true' || env.JFROG_REPOSITORY | ||
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1 | ||
|
||
- name: Set up Python and PDM | ||
|
@@ -155,6 +169,9 @@ runs: | |
IS_PR="${{ github.event_name == 'pull_request' }}" | ||
echo "is_pr=${IS_PR}" >> $GITHUB_OUTPUT | ||
IS_DIST==$(grep -E "distribution\s*=\s*true" pyproject.toml > /dev/null && echo "true" || echo "false") | ||
echo "is_distribution=${IS_DIST}" >> $GITHUB_OUTPUT | ||
env: | ||
PYPI_DEPLOY_TOKEN: ${{ inputs.pypi-token }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters