mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 18:46:29 +00:00
Move from azure pipelines to GitHub actions for build (#2170)
This commit is contained in:
parent
976ae96633
commit
fd4b3ee539
72
.github/workflows/builder.yml
vendored
Normal file
72
.github/workflows/builder.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
name: Build supervisor
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
release:
|
||||||
|
types: ["published"]
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- "rootfs/**"
|
||||||
|
- "supervisor/**"
|
||||||
|
- build.json
|
||||||
|
- Dockerfile
|
||||||
|
- requirements.txt
|
||||||
|
- setup.py
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_NAME: supervisor # This needs to match the key in the version file
|
||||||
|
BUILD_TYPE: supervisor # Can be plugin, core, supervisor or generic
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build supervisor
|
||||||
|
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 supervisor
|
||||||
|
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 }}
|
15
.github/workflows/ci.yaml
vendored
15
.github/workflows/ci.yaml
vendored
@ -429,18 +429,3 @@ jobs:
|
|||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v1.0.14
|
uses: codecov/codecov-action@v1.0.14
|
||||||
|
|
||||||
build:
|
|
||||||
name: Check build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out code from GitHub
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Build Supervisor
|
|
||||||
uses: home-assistant/builder@2020.10.0
|
|
||||||
with:
|
|
||||||
args: |
|
|
||||||
--test \
|
|
||||||
--all \
|
|
||||||
--target /data \
|
|
||||||
--generic ${{ github.sha }}
|
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
# https://dev.azure.com/home-assistant
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
batch: true
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- main
|
|
||||||
tags:
|
|
||||||
include:
|
|
||||||
- "*"
|
|
||||||
paths:
|
|
||||||
include:
|
|
||||||
- supervisor/*
|
|
||||||
- rootfs/*
|
|
||||||
- requirements.txt
|
|
||||||
- setup.py
|
|
||||||
- Dockerfile
|
|
||||||
- build.json
|
|
||||||
pr: none
|
|
||||||
variables:
|
|
||||||
- name: versionBuilder
|
|
||||||
value: "7.2.0"
|
|
||||||
- group: docker
|
|
||||||
- group: github
|
|
||||||
resources:
|
|
||||||
repositories:
|
|
||||||
- repository: azure
|
|
||||||
type: github
|
|
||||||
name: "home-assistant/ci-azure"
|
|
||||||
endpoint: "home-assistant"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
|
|
||||||
- stage: "Build"
|
|
||||||
jobs:
|
|
||||||
- job: "ReleaseDocker"
|
|
||||||
timeoutInMinutes: 240
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
strategy:
|
|
||||||
maxParallel: 5
|
|
||||||
matrix:
|
|
||||||
amd64:
|
|
||||||
buildArch: "amd64"
|
|
||||||
i386:
|
|
||||||
buildArch: "i386"
|
|
||||||
armhf:
|
|
||||||
buildArch: "armhf"
|
|
||||||
armv7:
|
|
||||||
buildArch: "armv7"
|
|
||||||
aarch64:
|
|
||||||
buildArch: "aarch64"
|
|
||||||
steps:
|
|
||||||
- template: templates/azp-step-su-version.yaml@azure
|
|
||||||
- template: templates/azp-step-build-generic.yaml@azure
|
|
||||||
parameters:
|
|
||||||
buildArch: $(buildArch)
|
|
||||||
buildVersion: $(supervisorRelease)
|
|
||||||
|
|
||||||
- stage: "Publish"
|
|
||||||
jobs:
|
|
||||||
- job: "ReleaseHassio"
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-latest"
|
|
||||||
steps:
|
|
||||||
- template: templates/azp-step-su-version.yaml@azure
|
|
||||||
- template: templates/azp-step-version-push.yaml@azure
|
|
||||||
parameters:
|
|
||||||
jsonTag: supervisor
|
|
||||||
commitName: Supervisor
|
|
||||||
buildVersion: $(supervisorRelease)
|
|
Loading…
x
Reference in New Issue
Block a user