Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0385612
Add --single flag and SINGLE_WAIT option for sequential updates
wbonis Jan 7, 2026
f0ee69e
Fix Docker build: convert 'custom' version to valid PEP 440 format
wbonis Jan 7, 2026
1c83d5e
Update CHANGELOG for v1.10.0 release
wbonis Jan 7, 2026
75e0f5d
update build.yaml for docekr
wbonis Jan 7, 2026
0591780
Enhance GitHub Actions workflow to support optional Docker Hub image …
wbonis Jan 7, 2026
9c88688
Update GitHub Actions workflow to use actions/checkout@v6
wbonis Jan 7, 2026
a86e8b3
Enhance error handling in Docker client and helpers
wbonis Jan 11, 2026
abe3bf1
Bump version to v1.11.0
wbonis Jan 11, 2026
67234f2
Add release script for managing version updates
wbonis Jan 11, 2026
c0d591d
Bump version to v1.11.1
wbonis Jan 11, 2026
a587959
Enhance update process in Docker client to send notifications and rec…
wbonis Jan 11, 2026
bd19624
Bump version to v1.11.2
wbonis Jan 11, 2026
f6642bc
Refactor release script and GitHub Actions workflow
wbonis Jan 11, 2026
56a3dce
Add tag existence checks to release script
wbonis Jan 11, 2026
031113c
Bump version to v1.11.3
wbonis Jan 11, 2026
b32d516
Enhance release script and disable test build workflow
wbonis Jan 11, 2026
68472b9
Bump version to v1.11.4
wbonis Jan 11, 2026
0275341
Fix 'update out of sequence' error in Swarm mode
wbonis Jan 11, 2026
175bf71
Fix 'update out of sequence' error in Swarm mode
wbonis Jan 11, 2026
9464aab
Merge branch 'single-run'
wbonis Jan 11, 2026
74f172e
Bump version to v1.11.5
wbonis Jan 11, 2026
0dcb12a
Refactor container and service update logic to continue processing in…
wbonis Jan 11, 2026
f1fc7e6
Bump version to v1.11.6
wbonis Jan 11, 2026
857d303
Bump docker/setup-buildx-action from 3 to 4
dependabot[bot] Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 134 additions & 122 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,147 +1,159 @@
name: Build
name: Release Docker Build

on:
release:
types: [published]
push:
tags:
- '*'

jobs:
test:
name: Docker Test on ubuntu-latest
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
build:
strategy:
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
arch: amd64
- platform: linux/arm64
runner: ubuntu-22.04-arm
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout Repository
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64

- name: Extract version
id: version
run: |
# Extract version from tag (e.g., v1.2.3 -> 1.2.3)
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION=${TAG_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"

# Extract major and minor versions for additional tags
IFS='.' read -r -a version_parts <<< "$VERSION"
MAJOR="${version_parts[0]}"
MINOR="${version_parts[1]}"
echo "major=$MAJOR" >> $GITHUB_OUTPUT
echo "minor=$MINOR" >> $GITHUB_OUTPUT
echo "Major: $MAJOR, Minor: $MINOR"

- name: Extract tag name
id: tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
echo "Tag: $TAG_NAME"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
version: latest
driver-opts: network=host
- name: Update Version String
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare Docker tags
id: tags
run: |
sed -i -r 's/VERSION = "custom"/VERSION = "0.0+test"/' pyouroboros/__init__.py
echo $?\
- name: Build Docker
echo "tags=ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-${{ matrix.arch }}" >> $GITHUB_OUTPUT

- name: Build and push release Docker images
uses: docker/build-push-action@v6
with:
push: true
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
cache-from: type=gha,scope=main
cache-to: type=gha,mode=max,scope=main
tags: localhost:5000/tester/ouroboros:test
- name: Test with Docker
run: |
sudo mkdir -p /app/pyouroboros/hooks
docker run --rm --name ouroboros -v /var/run/docker.sock:/var/run/docker.sock localhost:5000/tester/ouroboros:test --run-once --dry-run --log-level debug
build:
name: Docker Build on ubuntu-latest
platforms: ${{ matrix.platform }}
cache-from: type=gha,scope=linux-${{ matrix.arch }}
cache-to: type=gha,scope=linux-${{ matrix.arch }},mode=max
#cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/buildcache:linux-${{ matrix.arch }}
#cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/buildcache:linux-${{ matrix.arch }},mode=max

sbom: true
provenance: true
build-args: |
VERSION=${{ steps.version.outputs.version }}
VCS_REF=${{ github.sha }}
tags: ${{ steps.tags.outputs.tags }}

merge:
runs-on: ubuntu-latest
needs: test
needs: build
steps:
- name: Check Credentials
id: check_credentials
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_CLITOKEN: ${{ secrets.DOCKER_CLITOKEN }}
run: |
if [ "${DOCKER_USER}" == "" ]; then
echo "Missing User"
echo "missingsecrets=yes" >> $GITHUB_OUTPUT
elif [ "${DOCKER_CLITOKEN}" == "" ]; then
echo "Missing Cli Token"
echo "missingsecrets=yes" >> $GITHUB_OUTPUT
else
echo "All secrets present"
echo "missingsecrets=no" >> $GITHUB_OUTPUT
fi
- name: Checkout Repository
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Get Revision Variables
id: build_env

- name: Extract version
id: version
run: |
echo ${GITHUB_REF:10}
echo "branch=${GITHUB_REF:10}" >> $GITHUB_OUTPUT
- name: Set up QEMU
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64,arm
- name: Set up Docker Buildx
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to DockerHub Registry
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_CLITOKEN }}
logout: true
# Extract version from tag (e.g., v1.2.3 -> 1.2.3)
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION=${TAG_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"

# Extract major and minor versions for additional tags
IFS='.' read -r -a version_parts <<< "$VERSION"
MAJOR="${version_parts[0]}"
MINOR="${version_parts[1]}"
echo "major=$MAJOR" >> $GITHUB_OUTPUT
echo "minor=$MINOR" >> $GITHUB_OUTPUT
echo "Major: $MAJOR, Minor: $MINOR"

- name: Extract tag name
id: tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
echo "Tag: $TAG_NAME"

- name: Login to GitHub Container Registry
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: Update Version String
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
env:
OUROBOROS_VERSION: ${{ steps.build_env.outputs.branch }}

- name: Create and push multi-arch manifests
run: |
sed -i -r 's/VERSION = "custom"/VERSION = "'$OUROBOROS_VERSION'"/' pyouroboros/__init__.py
echo $?\
- name: Build and Push Docker
if: contains(steps.check_credentials.outputs.missingsecrets, 'no')
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
cache-from: type=gha,scope=main
cache-to: type=gha,mode=max,scope=main
tags: |
${{ secrets.DOCKER_USER }}/ouroboros:${{ steps.build_env.outputs.branch }}
${{ secrets.DOCKER_USER }}/ouroboros:latest
ghcr.io/${{ github.repository_owner }}/ouroboros:${{ steps.build_env.outputs.branch }}
ghcr.io/${{ github.repository_owner }}/ouroboros:latest
cleanup:
name: Cleanup Cache
runs-on: ubuntu-latest
needs: [test, build]
steps:
- name: Cleanup Cache
# GHCR manifests
docker buildx imagetools create \
-t ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }} \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-arm64

docker buildx imagetools create \
-t ghcr.io/${{ github.repository }}/ouroboros:latest \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-arm64

docker buildx imagetools create \
-t ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }} \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-arm64

docker buildx imagetools create \
-t ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.major }} \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}-arm64

- name: Create GitHub release
run: |
gh extension install actions/gh-actions-cache
REPO="${{ github.repository }}"
BRANCH="${{ github.ref }}"
echo "Fetching list of cache keys"
cacheKeys=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeys
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
NOTES="Release ${{ steps.tag.outputs.tag }}

Built from tag: ${{ steps.tag.outputs.tag }}

Docker Images:
- \`ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.version }}\`
- \`ghcr.io/${{ github.repository }}/ouroboros:latest\`
- \`ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}\`
- \`ghcr.io/${{ github.repository }}/ouroboros:${{ steps.version.outputs.major }}\`"
gh release create ${{ steps.tag.outputs.tag }} \
--title "Release ${{ steps.tag.outputs.tag }}" \
--notes "$NOTES" \
--latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 8 additions & 3 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Test Build

# Workflow disabled
on:
push:
pull_request:
workflow_dispatch:
inputs:
enabled:
description: 'Workflow is disabled'
required: false
default: 'false'

jobs:
test:
name: Docker Test on ubuntu-latest
if: false # Workflow disabled
runs-on: ubuntu-latest
services:
registry:
Expand All @@ -24,7 +29,7 @@ jobs:
with:
platforms: amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
with:
version: latest
driver-opts: network=host
Expand Down
Loading