Skip to content

Commit

Permalink
Try to make --new-only optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Jan 23, 2025
1 parent 613cafb commit 4a8c9eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
pdfium_ver:
default: 'latest'
type: string
new_only:
# only with package == "raw", ignored otherwise (actually the default should be false in that case, but I don't know if GH supports dynamic defaults depending on other inputs)
default: true
type: boolean
test:
default: true
type: boolean
Expand Down Expand Up @@ -62,9 +66,15 @@ jobs:
git config --global user.name "geisserml"
python -m pip install -U -r req/setup.txt
# TODO make --new-only optional
# TODO might be able to unify with ${{ inputs.package == "raw" && inputs.new_only && "--new-only" || "" }} or something

- name: Build package
run: ./run craft-conda ${{ inputs.package }} --pdfium-ver "${{ inputs.pdfium_ver }}" --new-only
if: ${{ inputs.package == "helpers" || !inputs.new_only }}
run: ./run craft-conda ${{ inputs.package }} --pdfium-ver ${{ inputs.pdfium_ver }}

- name: Build package (new only)
if: ${{ inputs.package == "raw" && inputs.new_only }}
run: ./run craft-conda ${{ inputs.package }} --pdfium-ver ${{ inputs.pdfium_ver }} --new-only

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ jobs:
{
"package": "helpers",
"pdfium_ver": "latest",
"new_only": "false",
"test": "true",
"publish": "${{ inputs.publish }}",
"py_version": "3.12"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/trigger_conda_raw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
{
"package": "raw",
"pdfium_ver": "latest",
"new_only": "true",
"test": "true",
"publish": "true",
"py_version": "3.12"
Expand Down

0 comments on commit 4a8c9eb

Please sign in to comment.