Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Exit on IRC read error (ping timeout) #106

Exit on IRC read error (ping timeout)

Exit on IRC read error (ping timeout) #106

Workflow file for this run

name: Publish Docker Image and Native Binaries
on:
push:
branches: '*'
paths:
- .github/workflows/build.yaml
- discord-irc.ts
- lib/**
- deno.*
- Dockerfile
tags: '*.*.*'
jobs:
publish-docker:
name: Publish Docker Image to GitHub Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract metadata for container image
uses: docker/metadata-action@v5
id: metadata
with:
images: ghcr.io/${{ github.repository }}
tags: |
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 publish container image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
publish-binaries:
name: Publish Native Binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Set the OS name suffix
id: os-suffix
uses: actions/github-script@v7
with:
result-encoding: string
script: return "${{ runner.os }}".toLowerCase();
- name: Compile AMD64 binary for Windows
if: runner.os == 'Windows'
run: deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-${{ steps.os-suffix.outputs.result }}-amd64.exe discord-irc.ts
- name: Compile AMD64 and ARM64 binaries for ${{ runner.os }}
if: runner.os != 'Windows'
run: |
deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-${{ steps.os-suffix.outputs.result }}-amd64 discord-irc.ts
deno compile --allow-net --allow-env=CONFIG_FILE,DEBUG,VERBOSE,NODE_EXTRA_CA_CERTS --allow-read --allow-write --output discord-irc-${{ steps.os-suffix.outputs.result }}-arm64 --target ${{ steps.os-suffix.outputs.result == 'macos' && 'aarch64-apple-darwin' || 'aarch64-unknown-linux-gnu' }} discord-irc.ts
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ runner.os == 'Windows' && 'x64' || 'x64-ARM64' }}
path: ./discord-irc-*