Skip to content

Update version to 1.9.2: fix worker containers reporting unhealthy #30

Update version to 1.9.2: fix worker containers reporting unhealthy

Update version to 1.9.2: fix worker containers reporting unhealthy #30

Workflow file for this run

name: 'Create Release'
# Two sequential jobs:
# 1. publish-image — build & push the unified container to GHCR
# 2. release — bundle compose zip + chrome-extension zip, publish GH Release
# The release is gated on the image being live so users who follow the
# release email and run `docker compose pull` immediately don't hit a 404.
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: read
jobs:
publish-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write # required for build provenance attestation
attestations: write # required by actions/attest-build-provenance
env:
REGISTRY: ghcr.io
IMAGE: ghcr.io/${{ github.repository_owner }}/webvideo2nas
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU (multi-arch)
uses: docker/setup-qemu-action@v3
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
type=sha,prefix=sha-,format=short
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=WebVideo2NAS — unified API + worker image
org.opencontainers.image.licenses=MIT
- name: Build and push
id: build
uses: docker/build-push-action@v6
with:
context: video-downloader/docker
file: video-downloader/docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: true
sbom: true
- name: Attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.IMAGE }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true
release:
needs: publish-image
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Compute version (strip leading v)'
id: version
run: echo "value=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: 'Generate changelog'
id: changelog
run: |
# Get current tag
CURRENT_TAG=${GITHUB_REF#refs/tags/}
# Get previous tag
PREVIOUS_TAG=$(git tag --sort=-creatordate | grep -A1 "^${CURRENT_TAG}$" | tail -n1)
# If no previous tag, use first commit
if [ -z "$PREVIOUS_TAG" ] || [ "$PREVIOUS_TAG" = "$CURRENT_TAG" ]; then
PREVIOUS_TAG=$(git rev-list --max-parents=0 HEAD)
echo "No previous tag found, using first commit"
fi
echo "Previous tag: $PREVIOUS_TAG"
echo "Current tag: $CURRENT_TAG"
# Generate commit log
CHANGELOG=$(git log ${PREVIOUS_TAG}..${CURRENT_TAG} --pretty=format:"- %s (%h)" --reverse)
# Handle multiline output
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: 'Create chrome-extension package'
run: |
cd chrome-extension
zip -r ../WebVideo2NAS-chrome-extension.zip . \
-x "tests/*" "tests/**" \
"node_modules/*" "node_modules/**" \
"vitest.config.js" \
"package.json" "package-lock.json"
- name: 'Create docker package'
# Slim release: ship only the deployment surface. The actual api+worker
# binary is the unified container image at ghcr.io/<owner>/webvideo2nas
# (built by the publish-image job above). Users `docker compose pull
# && up -d` instead of building from source.
run: |
cd video-downloader
zip ../WebVideo2NAS-downloader-docker.zip \
docker/docker-compose.synology.yml \
docker/docker-compose_not_synology.yml \
docker/init-db.sql \
docker/.env.example \
docker/SYNOLOGY_DEPLOY_COMMANDS.md
- name: 'Create Release'
uses: softprops/action-gh-release@v2
with:
files: |
WebVideo2NAS-chrome-extension.zip
WebVideo2NAS-downloader-docker.zip
body: |
## What's Changed
${{ steps.changelog.outputs.changelog }}
## Container image
Pull the matching image:
```
docker pull ghcr.io/${{ github.repository_owner }}/webvideo2nas:${{ steps.version.outputs.value }}
```
Or use `:latest` to track the newest release.