Skip to content

Commit

Permalink
add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed Jun 30, 2020
1 parent 5ec7e53 commit b0107db
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 50 deletions.
48 changes: 0 additions & 48 deletions .github/workflows/ci.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
tags:
- 'v*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Get the version (git tag)
id: get_version
run: |
echo ${GITHUB_REF/refs\/tags\//}
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build Image
run: |
docker build -t boot2homebridge .
docker run --rm boot2homebridge > boot2homebridge.iso
- name: Calculate Checksum
id: get_sha256_checksum
run: |
export IMAGE_SHA256_CHECKSUM=$(shasum -a 256 boot2homebridge.iso | awk '{print $1}')
echo "$IMAGE_SHA256_CHECKSUM boot2homebridge.iso"
echo ::set-output name=IMAGE_SHA256_CHECKSUM::${IMAGE_SHA256_CHECKSUM}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Click the link below to start your download:
<span align="center">
### [boot2homebridge.iso](https://github.com/oznu/boot2docker/releases/download/${{ steps.get_version.outputs.VERSION }}/boot2homebridge.iso)
</span>
---
* **SHA-256:** ${{ steps.get_sha256_checksum.outputs.IMAGE_SHA256_CHECKSUM }}
draft: false
prerelease: true
- name: Upload Image
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: boot2homebridge.iso
asset_name: boot2homebridge.iso
asset_content_type: application/x-iso9660-image
2 changes: 0 additions & 2 deletions MAINTAINERS

This file was deleted.

0 comments on commit b0107db

Please sign in to comment.