Files
coturn-server-config/.github/workflows/build-images.yml
T

48 lines
1.2 KiB
YAML

name: 01 - Build and Push Images
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docker/**"
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set lowercase owner name
run: |
# Use ZSH or Bash parameter expansion/tr to lowercase the string
OWNER_LC=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "OWNER_LC=$OWNER_LC" >> $GITHUB_ENV
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push TURN server image
uses: docker/build-push-action@v5
with:
context: ./docker/turn-server
push: true
tags: ghcr.io/${{ env.OWNER_LC }}/stoat-turn-server:4.0.1
- name: Build and push Caddy WAF image
uses: docker/build-push-action@v5
with:
context: ./docker/caddy
push: true
tags: ghcr.io/${{ env.OWNER_LC }}/stoat-caddy-waf:latest