Skip to content

Build and Push HydroServer Docker Image to GHCR #3

Build and Push HydroServer Docker Image to GHCR

Build and Push HydroServer Docker Image to GHCR #3

Workflow file for this run

name: Build and Push HydroServer Docker Image to GHCR
on:
release:
types: [created]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag used to build the Docker image'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name || github.event.inputs.release_tag }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name || github.event.inputs.release_tag }}