Skip to content

Commit

Permalink
Prepare to fully migrate from Travis to GitHub workflow, adding rest …
Browse files Browse the repository at this point in the history
…command - #21
  • Loading branch information
BeardedTinker committed Nov 14, 2020
1 parent 5553164 commit 85144a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Home Assistant CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 12 * * *

Expand Down Expand Up @@ -35,6 +36,10 @@ jobs:
steps:
- name: Getting your configuration from GitHub
uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Copy stub files into configuration folder
run: |
cp -R secrets_github.yaml secrets.yaml
Expand Down Expand Up @@ -96,5 +101,6 @@ jobs:
python -m homeassistant --version
- name: Home Assistant Check
uses: "docker://homeassistant/home-assistant:dev"
continue-on-error: true
with:
args: python -m homeassistant --config ./ --script check_config --info all
12 changes: 12 additions & 0 deletions entities/rest_command/github_actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#####
# Run GitHub workflow actions
#
#####

github_actions:
url: https://api.github.com/BeardedTinker/Home-Assistant_Config/actions/workflows/main.yml/dispatches
method: POST
headers:
authorization: !secret github_token2
Accept: "application/vnd.github.v3+json"
payload: '{"ref":"master"}'

0 comments on commit 85144a7

Please sign in to comment.