add new WF for caddy version

This commit is contained in:
2026-02-11 16:17:27 +05:30
parent bcfacbbe12
commit 67522ddbe6

View File

@@ -0,0 +1,27 @@
name: Build and Push Docker Image
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v4
-
name: Parse Caddy version
id: version
run: |
VERSION=$(grep -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]+$' Dockerfile | cut -d ':' -f2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version from file: $VERSION"
# Extract semantic version parts
MAJOR=$(echo $VERSION | cut -d. -f1)
MINOR=$(echo $VERSION | cut -d. -f1-2)
echo "major_version=$MAJOR" >> $GITHUB_OUTPUT
echo "minor_version=$MINOR" >> $GITHUB_OUTPUT
echo "Major: $MAJOR, Minor: $MINOR"