Skip to content

Commit

Permalink
COMP: Improve "CI" GitHub Action workflow uploading package as artifact
Browse files Browse the repository at this point in the history
This commit copies the package to GITHUB_WORKSPACE instead of RUNNER_TEMP. This
is required to workaround issue discussed in actions/runner#965 (Incorrect context
paths in container)

It also adds a step for uploading the generated Slicer package as an
artifact with a retention time of 1 day.
  • Loading branch information
jcfr committed Dec 1, 2021
1 parent 991cd64 commit b0dcc4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/slicer-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cp -r $GITHUB_WORKSPACE /usr/src/Slicer
package_filepath=$(head -n1 /usr/src/Slicer-build/Slicer-build/PACKAGE_FILE.txt)
echo "package_filepath [${package_filepath}]"

mv ${package_filepath} $RUNNER_TEMP/
mv ${package_filepath} $GITHUB_WORKSPACE/

package=$(basename $package_filepath)
echo "package [${package}]"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ jobs:
- name: 'Build Slicer'
uses: ./.github/actions/slicer-build

- name: 'Upload Slicer package'
uses: actions/upload-artifact@v2
with:
name: slicer-package
path: ${{ github.workspace }}/${{ steps.slicer-build.outputs.package }}
retention-days: 1

0 comments on commit b0dcc4a

Please sign in to comment.