Feature/127 integrate docs into main repo & changed to docusaurus #590
Workflow file for this run
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
name: Build and Deploy Dockerimage | |
on: | |
push: | |
branches: | |
- stable | |
- beta | |
- dev | |
tags: | |
- "v*.*.*" | |
pull_request: | |
branches: | |
- dev | |
- beta | |
types: [opened, labeled, synchronize, reopened, ready_for_review] | |
jobs: | |
docker: | |
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Docker bco meta | |
id: bco-meta | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
openbaseorg/bco | |
ghcr.io/openbase/bco | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=raw,value=review,enable=${{ contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=sha | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Login to GHCR | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build and push bco | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
tags: ${{ steps.bco-meta.outputs.tags }} | |
labels: ${{ steps.bco-meta.outputs.labels }} | |
env: | |
TAG: 3.0-alpha | |
- | |
name: Docker bco device meta | |
id: bco-device-meta | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
openbaseorg/bco-device-manager-openhab | |
ghcr.io/openbase/bco-device-manager-openhab | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=raw,value=review,enable=${{ contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=sha | |
- | |
uses: benjlevesque/short-sha@v1.2 | |
id: short-sha | |
- | |
name: Build and push bco device manager | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./docker/device-manager/openhab | |
build-args: | | |
BCO_BASE_IMAGE_VERSION=sha-${{ steps.short-sha.outputs.sha }} | |
file: ./docker/device-manager/openhab/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
tags: ${{ steps.bco-device-meta.outputs.tags }} | |
labels: ${{ steps.bco-device-meta.outputs.labels }} | |
- | |
name: Docker bco demo meta | |
id: bco-demo-meta | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
openbaseorg/bco-demo | |
ghcr.io/openbase/bco-demo | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=raw,value=review,enable=${{ contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=sha | |
- | |
name: Build and push bco demo | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./docker/bco-demo | |
build-args: | | |
BCO_BASE_IMAGE_VERSION=sha-${{ steps.short-sha.outputs.sha }} | |
file: ./docker/bco-demo/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'prebuild docker image') }} | |
tags: ${{ steps.bco-demo-meta.outputs.tags }} | |
labels: ${{ steps.bco-demo-meta.outputs.labels }} |