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
Milestone

Comments

@narqo
Copy link

@narqo 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

This comment has been minimized.

Copy link

@ncw ncw commented Sep 19, 2019

Thanks for working this out - very helpful :-)

@elgohr

This comment has been minimized.

Copy link

@elgohr 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

This comment has been minimized.

Copy link
Member

@ericsciple ericsciple commented Dec 13, 2019

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

@ericsciple ericsciple closed this Dec 13, 2019
@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.