Add Stun server Dockerfile and config (#2) #3
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
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 }} |