Skip to content

Commit

Permalink
Add Docker image build and push on release workflow (#1)
Browse files Browse the repository at this point in the history
* Add Docker image build and push on release workflow

* Improvements to release workflow

* Update .github/workflows/release.yml

Co-authored-by: Joakim Sørensen <[email protected]>

* Update .github/workflows/release.yml

Co-authored-by: Joakim Sørensen <[email protected]>

* Remove Qemu step

---------

Co-authored-by: Joakim Sørensen <[email protected]>
  • Loading branch information
klejejs and ludeeus authored Sep 23, 2024
1 parent 34a2d12 commit b7aa2ce
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and push Stun server Docker image on release

on:
release:
types:
- published

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 }}

0 comments on commit b7aa2ce

Please sign in to comment.