Skip to content

feat: ui now shows evicting #16

feat: ui now shows evicting

feat: ui now shows evicting #16

Workflow file for this run

name: Build and Push Docker Image
on:
push:
tags:
- 'v*.*.*' # Triggers on version tags like v1.0.0, v2.1.3, etc.
env:
DOCKER_IMAGE_NAME: awkto/kea-gui-reservations # Change to your Docker Hub username/repo
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write # Required for creating releases
packages: write # Optional: for GitHub Container Registry
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from tag
id: extract_version
run: |
# Remove 'v' prefix from tag to get version
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Building version: $VERSION"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ env.DOCKER_IMAGE_NAME }}
short-description: "Kea DHCPv4 lease promotion GUI"
readme-filepath: ./README.md
continue-on-error: true
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.extract_version.outputs.VERSION }}
${{ env.DOCKER_IMAGE_NAME }}:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Create or Update GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
fail_on_unmatched_files: false
body: |
## Docker Image
Pull the image:
```bash
docker pull ${{ env.DOCKER_IMAGE_NAME }}:${{ steps.extract_version.outputs.VERSION }}
# or
docker pull ${{ env.DOCKER_IMAGE_NAME }}:latest
```
Run the container:
```bash
docker run -p 5000:5000 \
-v $(pwd)/config.yaml:/app/config/config.yaml:ro \
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.extract_version.outputs.VERSION }}
```
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}