An action for building a BlueOS Extension and deploying it to a Docker registry.
Automatically builds for multiple hardware architectures, and provides inputs for common BlueOS Extesnion metadata variables to pass to your Dockerfile when building.
Variable | Description | Required? | Example |
---|---|---|---|
docker-username |
Your username for your Docker registry of choice*. Should be stored in a GitHub Action Secret. *Currently only Docker Hub is supported. MUST be lowercase. |
YES | secrets.DOCKER_USERNAME |
docker-password |
The password for your Docker registry authentication. Should be stored in a GitHub Action Secret. Recommended to set the secret to a Docker Hub Access Token. |
YES | secrets.DOCKER_PASSWORD |
github-token |
Your authentification token for GitHub, for uploading image artifacts to a release/tag. | YES (if building for releases) | Should be set to secrets.GITHUB_TOKEN |
build-platforms |
A comma-separated string of the architectures to build for. Defaults to the ones BlueOS is automatically built for. |
NO | 'linux/arm/v7,linux/arm64/v8,linux/amd64' |
image-name |
The base name for the Docker Images and GitHub Artifacts. | YES | 'extension-name' |
image-prefix |
An optional prefix for the Docker Image name. Defaults to 'blueos-' . |
NO | 'blueos-' |
author |
NO | 'Author Name' |
|
author-email |
NO | 'author.email@example.com' |
|
maintainer |
The maintaining organisation or developer. Defaults to the repository owner. |
NO | 'Devs-R-US' |
maintainer-email |
NO | 'maintainer.email@example.com' |
To start with, make a Docker repository in your registry accound with the name {image-prefix}{image-name}
. Note that image-prefix
defaults to blueos-
if left unspecified.
name: Deploy BlueOS Extension Image
on:
push:
pull_request:
# Run manually
workflow_dispatch:
# NOTE: caches may be removed if not run weekly
# -> may be worth scheduling for every 6 days
jobs:
deploy-docker-image:
# set the agent to run on
runs-on: ubuntu-latest
steps:
- name: Deploy BlueOS Extension
uses: BlueOS-community/Deploy-BlueOS-Extension@v1.0.1
# specify the desired variables
with:
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-password: ${{ secrets.DOCKER_PASSWORD }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# image-name should not start with blueos- (see image-prefix)
image-name: 'something-creative'
You may also wish to define some GitHub Action Variables, which can be modified later / by repository forkers without needing to change the action file. ES-Alexander/QuickStart-Python-Extension is an example of this.