okteto / apply

Github action to create or update resources in your Okteto Cloud namespace
Apache License 2.0
19 stars 4 forks source link

Can't find default k8s.yml #1

Closed pedro-gutierrez closed 4 years ago

pedro-gutierrez commented 4 years ago

My repo at https://github.com/pedro-gutierrez/elementary.git has ak8s.yml manifest. I've successfully tested It both locally and in Okteto Cloud.

I've configured this simple workflow https://github.com/pedro-gutierrez/elementary/blob/master/.github/workflows/okteto.yml

but it seems it can't find the k8s.yml file:

/usr/bin/docker run --name b3ac68dcfc51bff594d77a2cd2114e85d61ff_85c634 --label 3b3ac6 --workdir /github/workspace --rm -e INPUT_MANIFEST -e INPUT_NAMESPACE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/elementary/elementary":"/github/workspace" 3b3ac6:8dcfc51bff594d77a2cd2114e85d61ff  "k8s.yml" ""
running: kubectl apply -f k8s.yml
error: the path "k8s.yml" does not exist

Full run at: https://github.com/pedro-gutierrez/elementary/runs/1063263773?check_suite_focus=true

rberrelleza commented 4 years ago

@pedro-gutierrez You need to add a checkout action to your workflow so it checks out your repo.

Here's an example of that: https://github.com/rberrelleza/actions-test/blob/master/.github/workflows/main.yaml

I'll update the sample to include this for clarity.

pedro-gutierrez commented 4 years ago

Ah thanks a lot! As you can see, I am pretty new to GitHub Actions. It works great ! thank you

rberrelleza commented 4 years ago

We're all learning together!

pedro-gutierrez commented 4 years ago

I was wondering if it would make sense to add an option so that we can trigger a kubectl rollout restart <resource> <name> ? I am probably taking shortcuts, but this could simplify some early/dev workflows where we are intentionally overwriting docker images with the tag :latest for instance.

rberrelleza commented 4 years ago

Yeah, I think that's a good idea. Do you think we should keep it here, or as a separate action?

I'm also working on a 'pipeline' action, maybe that's a better fit for this kind of actions?

pedro-gutierrez commented 4 years ago

A separate action is better, you are right. And pipeline action sounds even more powerful.

rberrelleza commented 4 years ago

Implementing https://github.com/okteto/pipeline/ , we can discuss specifics there!

I updated the sample here to add the checkout task for future users, so I'll go ahead and close this, but feel free to reopen (or file a new one) if you hit something else.