-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
034e497
commit f09d550
Showing
1 changed file
with
9 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,17 +108,22 @@ jobs: | |
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.8 | ||
cache: 'pip' | ||
|
||
- name: Install the remove-previous-image from github.com/ai-cfia/devops inside the user-site | ||
run: pip install git+https://$USER:[email protected]/ai-cfia/devops.git@26-as-a-devops-i-want-to-create-unit-tests-for-the-remove-previous-imagepy-script | ||
run: python -m pip install --user git+https://$USER:[email protected]/ai-cfia/devops.git@26-as-a-devops-i-want-to-create-unit-tests-for-the-remove-previous-imagepy-script | ||
env: | ||
USER: ${{ secrets.USER }} | ||
USER_TOKEN: ${{ secrets.USER_TOKEN }} | ||
|
||
- name: Access user site-packages | ||
run: | | ||
USER_SITE=$(python -m site --user-site) | ||
echo "Path to site-packages is $USER_SITE" | ||
echo "USER_SITE=$USER_SITE" >> $GITHUB_ENV | ||
- name: Delete the previous image (unmerged pull request) | ||
if: github.event.pull_request.merged == false | ||
run: python remove-previous-image/remove_previous_image.py | ||
run: python $USER_SITE/remove-previous-image/remove_previous_image.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REGISTRY: ${{ inputs.registry }} | ||
|
@@ -129,7 +134,7 @@ jobs: | |
|
||
- name: Delete the previous image (merged pull request) | ||
if: github.event.pull_request.merged == true | ||
run: python remove-previous-image/remove_previous_image.py | ||
run: python $USER_SITE/remove-previous-image/remove_previous_image.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
REGISTRY: ${{ inputs.registry }} | ||
|