Skip to content

Commit

Permalink
Upload to new conda repo (#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeSullivan7 authored Jan 25, 2024
2 parents 6f47823 + a17b5d2 commit bd75526
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/actions/publish-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ inputs:
repository:
description: 'Anaconda repository'
required: true
default: 'mantidimaging'
repository-old:
description: 'Anaconda repository - old'
required: true
default: 'mantid'
label:
description: 'Label'
Expand All @@ -12,6 +16,9 @@ inputs:
token:
description: 'Anaconda API Token'
required: true
token-old:
description: 'Anaconda API Token - old'
required: true

description: Build conda package
runs:
Expand All @@ -35,8 +42,10 @@ runs:
shell: bash -l {0}
run: |
conda activate build-env
conda config --set anaconda_upload yes
conda config --set anaconda_upload no
# if the upload silently fails - check the token expiration. Conda can fail silently!
conda mambabuild --user ${{ inputs.repository }} --token ${{ inputs.token }} --label ${{ inputs.label }} $GITHUB_WORKSPACE/conda |& tee upload.log
conda mambabuild $GITHUB_WORKSPACE/conda
anaconda -t ${{ inputs.token }} upload --user ${{ inputs.repository }} --label ${{ inputs.label }} ${CONDA_PREFIX}/conda-bld/*/mantidimaging*.tar.bz2 |& tee upload.log
anaconda -t ${{ inputs.token-old }} upload --user ${{ inputs.repository-old }} --label ${{ inputs.label }} ${CONDA_PREFIX}/conda-bld/*/mantidimaging*.tar.bz2
# Check that upload completed
grep "Upload complete" upload.log
3 changes: 2 additions & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@ jobs:
uses: ./.github/actions/publish-package
with:
label: unstable
token: ${{ secrets.ANACONDA_API_TOKEN }}
token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }}
token-old: ${{ secrets.ANACONDA_API_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ jobs:
uses: ./.github/actions/publish-package
with:
label: unstable
token: ${{ secrets.ANACONDA_API_TOKEN }}
token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }}
token-old: ${{ secrets.ANACONDA_API_TOKEN }}

0 comments on commit bd75526

Please sign in to comment.