Closed zhuchcn closed 9 months ago
Anyone has any idea why this is failing? I tried a couple of things already but neither worked.
https://github.com/uclahs-cds/pipeline-test-docs/actions/runs/3805948374/jobs/6474319286
It says adding this line below which I already did.
git config --global --add safe.directory /github/workspace
Anyone has any idea why this is failing? I tried a couple of things already but neither worked.
https://github.com/uclahs-cds/pipeline-test-docs/actions/runs/3805948374/jobs/6474319286
It says adding this line below which I already did.
git config --global --add safe.directory /github/workspace
I am speculating - the user running commands in the Docker container is probably not the same user as the one that created /github/workspace
within the Actions environment. I think your solutions are either to use -u
to set the user to the current user that runs docker run
, or to run the git config ...
command either just before docker run
, or within the container itself. The error is thrown by git
, so where that is run is where git config ...
needs to run.
I am speculating - the user running commands in the Docker container is probably not the same user as the one that created
/github/workspace
within the Actions environment. I think your solutions are either to use-u
to set the user to the current user that runsdocker run
, or to run thegit config ...
command either just beforedocker run
, or within the container itself. The error is thrown bygit
, so where that is run is wheregit config ...
needs to run.
I think you are correct @aholmes . The lines that set user name for git were in a if statement before which I guess was not executed, so the git user was not updated to be consistent with who runs the docker run command. I took them out off the if then block and it works now! It's interesting that the same code worked before but one day suddenly not. There must be an update in github action at the lower level.
@aholmes In the latest commit, I added a validation step that takes the image path and checks whether the type is in the set of allowed file types. One issue is that the SVGs in many of our pipelines won't work.
Here is an example of a valid SVG file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg enable-background="new 0 0 2014 1674.641" version="1.1" viewBox="0 0 2014 1674.641" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<path d="m44.883 1173.3c0 169.58 92.136 317.37 229.08 396.59v-793.53c-136.94 79.216-229.08 227.37-229.08 396.94z"/>
<path d="m1496.5 173.21c-338.54-181.18-640.46-181.19-978.98 0-115.34 61.726-232.1 201.31-232.1 348.66v1048h125.99v-1048c0-100.78 121.24-229.18 225.54-272.38 280.15-116.04 460-116.04 740.11 0 10 <path d="m1740 776.38v793.53c136.94-79.214 229.08-227 229.08-396.59 1e-3 -169.57-92.133-317.73-229.08-396.94z"/>
<path d="m541.72 709.03h-70.645c-27.201 0-49.252 22.051-49.252 49.253v829.79c0 27.201 22.05 49.252 49.252 49.252h70.645c27.201 0 49.252-22.051 49.252-49.252v-829.79c0-27.202-22.05-49.253-49.252 <path d="m1542 709.03h-70.646c-27.2 0-49.252 22.051-49.252 49.253v829.79c0 27.201 22.052 49.252 49.252 49.252h70.646c27.2 0 49.252-22.051 49.252-49.252v-829.79c-1e-3 -27.202-22.052-49.253-49.25 <path d="m595.97 1132.8c4.322-0.219 8.643-0.184 12.965 0 0.197 4.557 3.624 24.404 4.471 95.602 0 1.438 0.298 2.849 0.728 4.225 0.691 13.2-0.668 21.337 0.868 26.298 0.386 12.904 0.053 25.834 0.1</svg>
Below is the top part of the SVG from align-DNA (here). I think the reason is it is missing the !DOCTYPE
tag.
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="601px" height="401px" viewBox="-0.5 -0.5 601 401" content="<mxfile><diagram id="HA5oE-mWmYIwB086D-Jq" name="Page-1">3Vpbc+I2FP41zLQPu2P5nkcMZDczZZoOO93No4KFcSNbrhAL9NdXsuWrDJjgxGR5AOvoSOhcvk/oiJExifZfKEzWc+IjPNI1fz8ypiNdd3WTvwvBQQpcOxMENPQzESgFi/A/JIWalG5DH21qiowQzMKkLlySOEZLVpNBSsmurrYiuP6tCQyQIlgsIVal30OfrTOprWml/CsKg7X8ZjPviGCuKwWbNfTJriIyZiNjQglh2VO0nyAsXJe7JRt3f6S3WBdFMesywJDr+AnxVtomF8YOubG7dcjQIoFL0d7xeI4Mb80izFuAP24YJS9oQjChqb5xn754j5waUYb2R9cHCqt5siASIUYPXGXX4tZ1m0uhDGVQjC3N5Q/S4nbrzfPGI58HXjYJZWsSkBjiWSn1KNnGPhIzarxV6vxBSCJd9A9i7C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U0DLQz3/GssbWdNGTGISIyWAUlingiPh6fQnmnz/arBhwXLn2FDvI2T2kGzYx12b/t5V1+OX2P0zIm+W/zbLakHlP/aM2f8=</diagram></mxfile>">
<defs/>
<g>
<rect x="0" y="0" width="600" height="400" fill="#ffffff" stroke="#ffffff" pointer-events="all"/>
<path d="M 173 60 L 233.63 60" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 238.88 60 L 231.88 63.5 L 233.63 60 L 231.88 56.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 23 90 L 43 30 L 183 30 L 163 90 Z" fill="#b46e46" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
We can either write a checker for SVG file for our own, or just use python-magic's checker and make sure the SVG in our repos follow the standards. Any thought?
This is my Ship-it day project. This action takes the single-page README.md file and build a documentation website. Here is a demo pipeline: https://github.com/uclahs-cds/pipeline-test-docs And the website: uclahs-cds.github.io/pipeline-test-docs
Noted that the
mkdocs.yaml
file is optional. If not given, the pipeline name is automatically inferred from the github repository name.