feat: use server-sent events instead of websockets (#172) #86
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
# This is a basic workflow to help you get started with Actions | |
name: Publish Image to Docker Registries | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- development | |
paths-ignore: | |
- "docs/**" | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set Docker Platforms For Branch | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/development' ]]; then | |
echo "DOCKER_PLATFORMS=linux/amd64" >> "$GITHUB_ENV" | |
else | |
echo "DOCKER_PLATFORMS=linux/amd64,linux/arm64,linux/arm" >> "$GITHUB_ENV" | |
fi | |
- name: Set Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
evanbuss/openbooks | |
ghcr.io/${{ github.repository }} | |
# generate Docker tags based on the following events/attributes | |
# 'latest' when push to master with tag | |
# 'edge' when push to development | |
# '1.1.1' when push version tag v1.1.1 | |
flavor: | | |
latest=auto | |
tags: | | |
# set latest tag for default branch | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=semver,pattern={{version}} | |
type=edge,branch=development | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
install: true | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: ${{ env.DOCKER_PLATFORMS }} | |
push: true | |
labels: ${{ steps.meta.outputs.labels }} | |
tags: ${{ steps.meta.outputs.tags }} | |
- name: Docker Hub Description | |
uses: peter-evans/dockerhub-description@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: evanbuss/openbooks | |
short-description: IRC Highway eBook Downloads | |
readme-filepath: ./docker.md |