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

Add GitHub workflow/actions #21

Closed
BeardedTinker opened this issue Sep 25, 2020 · 4 comments
Closed

Add GitHub workflow/actions #21

BeardedTinker opened this issue Sep 25, 2020 · 4 comments
Assignees
Labels
Enhancement New feature or request Help wanted Extra attention is needed

Comments

@BeardedTinker
Copy link
Owner

Will add GitHub actions/workflow to test configuration not by Travis CI (or not only by Travis CI) but also with GitHub CI.

Possible enhancement could be to add testing against BETA and DEV version too - similar what @frenck has in his repository.

@BeardedTinker BeardedTinker added the Enhancement New feature or request label Sep 25, 2020
@BeardedTinker BeardedTinker self-assigned this Sep 25, 2020
BeardedTinker added a commit that referenced this issue Sep 25, 2020
Added copy of Francks action. #21
BeardedTinker pushed a commit that referenced this issue Sep 25, 2020
@BeardedTinker BeardedTinker added the Help wanted Extra attention is needed label Sep 26, 2020
@BeardedTinker
Copy link
Owner Author

OK, I've been fighting with this for some time now...
The problem is paths...

/usr/bin/docker run --name homeassistanthomeassistantstable_b54071 --label aac2aa --workdir /github/workspace --rm -e INPUT_ARGS -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 GITHUB_PATH -e GITHUB_ENV -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/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Home-Assistant_Config/Home-Assistant_Config":"/github/workspace" homeassistant/home-assistant:stable python -m homeassistant --config ./ --script check_config --info all
Testing configuration at /github/workspace/./
Failed config
  homeassistant: 
    - not a directory @ data['allowlist_external_dirs'][0]
    - allowlist_external_dirs: [source /github/workspace/./configuration.yaml:10]
        - /config/tmp

Tried following:

          sudo mkdir -p /config/tmp
          sudo mkdir -p config/tmp
          sudo mkdir -p ./config/tmp

And none of that is working.
The "easy" fix would be to completely redo my Home Assistant and GitHub repository, change all paths, move everything to /config folder... But that's easy in theory in practice I would have to redo all from scratch.

Probably easy fix, but I have no clue what to do next...

@frenck
Copy link

frenck commented Sep 26, 2020

A neat little trick / workaround is to put those folders into your secrets file. While not a secret, they can be swapped out during CI using a secrets stub file

@BeardedTinker
Copy link
Owner Author

Wow, that really is a great trick! Never thought of that!

@BeardedTinker
Copy link
Owner Author

Thanks to the great tip, this is now fixed. Added a bit of complexity, but now both Travis CI and GitHub CI are working, with GitHub one also checking against Beta and Dev versions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants