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

How do you provide the filepath to the metadata #247

Closed
codeBehindMe opened this issue Nov 16, 2021 · 3 comments
Closed

How do you provide the filepath to the metadata #247

codeBehindMe opened this issue Nov 16, 2021 · 3 comments

Comments

@codeBehindMe
Copy link

Question

So I'm not sure what i'm doing wrong here. But I keep a running: gcloud beta run services replace service.yaml --platform managed --region australia-southeast1 Error: ERROR: (gcloud.beta.run.services.replace) argument FILE: Failed to load YAML from [service.yaml]: Unable to read file [service.yaml]: [Errno 2] No such file or directory: 'service.yaml' error.

I have copied the service.yaml file to every single possible location. relative to the directory path. i.e.
it is now at root of the repo; it is also at the .github folder. it's also at the .github/workflows folder. It is also at the repo_root/infrac/service.yaml location.

@sethvargo
Copy link
Member

The GITHUB_WORKSPACE environment variable will point to the workspace directory path. Initially this is empty, until you run actions/checkout. Depending on your setup, this could be a different directory than the current working directory. So if the service.yaml is in your repo, you could specify the absolute path to avoid needing to find the relative location:

gcloud beta run services replace $GITHUB_WORKSPACE/service.yaml ...

@erikw
Copy link

erikw commented Dec 19, 2021

@codeBehindMe I came here as I had the same issue. For me I turned out that debugging that I had disabled the actions/checkout step, thus the repo and the service.yaml was not available. This could maybe be the case for you as well?

@averikitsch
Copy link
Contributor

use the metadata input with the relative path to the file, ex:

metadata: ./tests/unit/service.full.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants