-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from Sabuto/chore/move-to-github-workflow
chore: move to GitHub workflow
- Loading branch information
Showing
5 changed files
with
72 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Docker build and shellcheck | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: shellcheck | ||
run: shellcheck telegraf/run.sh | ||
- name: build docker files | ||
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t telegraf --all --test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: if release | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
tags: | ||
- 0.* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: shellcheck | ||
run: shellcheck telegraf/run.sh | ||
- name: build docker files | ||
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t telegraf --all --test | ||
- name: deploy docker files | ||
if: github.event_name != 'pull_request' | ||
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /home/travis/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder --target telegraf --all --release-tag --docker-user sabuto --docker-password ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
push-config-to-main-repo: | ||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: main | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
path: main | ||
- name: secondary | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
path: secondary | ||
repository: sabuto/hassio-repo-dev | ||
|
||
- name: setup local env | ||
run: | | ||
\cp -Rv main/telegraf/config.json secondary/telegraf/config.json | ||
cd secondary | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "sabuto" | ||
git add . | ||
git commit -m "Add changes" | ||
- name: copy config to repo dir in case of change | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_PSA }} | ||
repository: sabuto/hassio-repo-dev | ||
directory: secondary |
This file was deleted.
Oops, something went wrong.