Skip to content

v1.6.2

v1.6.2 #116

Workflow file for this run

name: Build and Push HydroServer Docker Image to GHCR
on:
release:
types: [created, edited]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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 Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
build-args: |
RELEASE=${{ github.event.release.tag_name }}
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
${{ github.event.release.prerelease != true && format('ghcr.io/{0}:latest', github.repository) || '' }}