ci: dynamic HOST
& PORT
envvar, don't expose 3000/tcp
by default
#9
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: Release Build | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'releases/**' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.job }}-${{ github.ref }}-build | |
cancel-in-progress: true | |
jobs: | |
push_to_registry: | |
name: Docker Image to GitHub Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64/v8 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: | | |
ghcr.io/${{ github.repository }}:dev |