Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document path restrictions #41

Closed
narqo opened this issue Sep 15, 2019 · 3 comments
Closed

Document path restrictions #41

narqo opened this issue Sep 15, 2019 · 3 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@narqo
Copy link

narqo commented Sep 15, 2019

After some experiments, it seems that path argument has restrictions on what values can be used. That is, I have tried making checkout to clone the repo into GOPATH workspace, e.g. I required the clone path to be exactly $GOPATH/src/github.com/<owner>/<repo>, but none of the following worked as expected:

Both following variants fired an error that looked like the value of the path couldn't be absolute:

- uses: actions/checkout@v1
  with:
    path: /home/runner/go/src/github.com/${{ github.repository }}

- uses: actions/checkout@v1
  with:
    path: ${{ runner.workspace }}/src/github.com/${{ github.repository }}

The following produced the same error, even though the path wasn't an absolute:

- uses: actions/checkout@v1
  with:
    path: src/github.com/${{ github.repository }}

The following worked, but checkout didn't expand the value of $GOPATH:

- uses: actions/checkout@v1
  with:
    path: $GOPATH/src/github.com/${{ github.repository }}
  env:
    GOPATH: ${{ runner.workspace }}

The only way to made it work as I needed was the following

- uses: actions/checkout@v1
  with:
    path: ./src/github.com/${{ github.repository }}

With the above configuration, I could use env: GOPATH: ${{ runner.workspace }} in the subsequent run steps. See the full example in the PR profefe/profefe#34

That's being said, the restrictions for path requires some clarification.

@ncw
Copy link

ncw commented Sep 19, 2019

Thanks for working this out - very helpful :-)

@elgohr
Copy link

elgohr commented Sep 21, 2019

Some more documentation would be really useful.
Here is another interpretation of path
elgohr/Publish-Docker-Github-Action#23

@ericsciple ericsciple added the documentation Improvements or additions to documentation label Dec 13, 2019
@ericsciple
Copy link
Contributor

i updated the docs in master which is now v2-beta. I'll push a v2 tag tomorrow

@ericsciple ericsciple added this to the v2 milestone Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants