Skip to content

new-release

new-release #9

Workflow file for this run

# Copyright (C) 2017-2023 Smart code 203358507
name: Build and publish Docker image
on:
repository_dispatch:
types: [new-release]
jobs:
build-and-publish:
name: Build and publish Docker image tag ${{ github.event.client_payload.tag }}
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: stremio/server
- name: Checkout
uses: actions/checkout@v4
- name: Build and push Docker image
# docs: https://github.com/docker/build-push-action
uses: docker/build-push-action@v4
with:
context: .
# GH action: https://docs.docker.com/build/ci/github-actions/multi-platform/
# Docs: https://docs.docker.com/engine/reference/commandline/buildx_build/#platform
# `linux/amd64` is used for linux/x86_64
# `linux/arm64` and linux/arm64/v8 are aliases!
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
build-args: VERSION=${{ github.event.client_payload.tag }}
# Tag as latest and the `client_payload` version tag
tags: stremio/server:${{ github.event.client_payload.tag }},stremio/server:latest
labels: ${{ steps.meta.outputs.labels }}