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

chore: move to GitHub workflow #19

Merged
merged 2 commits into from
Feb 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
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
57 changes: 57 additions & 0 deletions .github/workflows/tag.yml
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
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

12 changes: 0 additions & 12 deletions build.sh

This file was deleted.

19 changes: 0 additions & 19 deletions dist.sh

This file was deleted.