Skip to content

Workflow file for this run

name: Build and push Stun server Docker image on release
on:
release:
types:
- published
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository == 'home-assistant/stun' }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
if: ${{ github.event_name == 'release' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name == 'release' }}
tags: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name || github.sha }}