Skip to content

Refactor stream to use framegrab #66

Refactor stream to use framegrab

Refactor stream to use framegrab #66

name: Build, Test, Publish Docker image
on:
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: groundlight/stream
- name: Set up QEMU for multi-arch builds
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx for multi-arch
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build one arch first to test.
uses: docker/build-push-action@v5
with:
context: .
push: false
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Specify output so we can run a test against it
outputs: type=docker
- name: Run basic test
run: |
set -ex
# Just check that python command runs at all
docker run ${DOCKER_METADATA_OUTPUT_TAGS} --help
- name: Build multi-arch and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Update Docker Hub description from README file
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: groundlight/stream
readme-filepath: ./README.md
enable-url-completion: true