forked from boot2docker/boot2docker
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,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 |
This file was deleted.
Oops, something went wrong.