Skip to content

Commit

Permalink
Move from azure pipelines to GitHub actions for build (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Oct 24, 2020
1 parent 12d786c commit 1d86047
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 68 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build plugin

on:
pull_request:
branches: ["master"]
release:
types: ["published"]
push:
branches: ["master"]
paths:
- Dockerfile
- build.json
- 'rootfs/**'

env:
BUILD_NAME: multicast # This needs to match the key in the version file
BUILD_TYPE: plugin # Can be plugin, core, supervisor or generic

jobs:
build:
name: Build plugin
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get version
id: version
uses: home-assistant/actions/helpers/version@master
with:
type: ${{ env.BUILD_TYPE }}

- name: Initialize git
if: steps.version.outputs.publish == 'true'
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}

- name: Login to DockerHub
if: steps.version.outputs.publish == 'true'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set build arguments
if: steps.version.outputs.publish == 'false'
run: echo "BUILD_ARGS=--test" >> $GITHUB_ENV

- name: Build plugin
uses: home-assistant/builder@2020.10.0
with:
args: |
$BUILD_ARGS \
--all \
--target /data \
--generic ${{ steps.version.outputs.version }}
- name: Update version file
if: steps.version.outputs.publish == 'true'
uses: home-assistant/actions/helpers/version-push@master
with:
key: ${{ env.BUILD_NAME }}
version: ${{ steps.version.outputs.version }}
channel: ${{ steps.version.outputs.channel }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# plugin-multicast

Multicast implementation for Home Assistant
68 changes: 0 additions & 68 deletions azure-pipelines-release.yml

This file was deleted.

0 comments on commit 1d86047

Please sign in to comment.