Skip to content

Usenet streaming with a WebDAV server and a SABnzbd-compatible API

C#

chore: publish pre-release images.

nzbdav-devba9b37e31350
diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml
new file mode 100644
index 00000000..a519315e
--- /dev/null
+++ b/.github/workflows/branch.yml
@@ -0,0 +1,59 @@
+name: "Deploy Branch Images"
+
+on:
+ push:
+ branches:
+ - '**'
+ - '!main'
+ - '!dependabot/**'
+
+ workflow_dispatch:
+
+jobs:
+ build-and-push:
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: read
+ packages: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v4
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v4
+
+ - name: Log in to GHCR
+ uses: docker/login-action@v4
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set tags and NZBDAV_VERSION
+ id: set_vars
+ run: |
+ RAW_REF="${{ github.ref_name }}"
+ DOCKER_TAG=$(echo "$RAW_REF" \
+ | tr '[:upper:]' '[:lower:]' \
+ | sed -E 's#[^a-z0-9._-]+#-#g' \
+ | sed -E 's#(^-+|-+$)##g')
+ echo "DOCKER_TAG: $DOCKER_TAG"
+ echo "NZBDAV_VERSION=${{ github.ref_name }}" >> $GITHUB_OUTPUT
+ GHCR_REPO="ghcr.io/${{ github.repository }}"
+ echo "TAGS=${GHCR_REPO}:${DOCKER_TAG}" >> $GITHUB_OUTPUT
+
+ - name: Build and push Docker image (amd64 + arm64)
+ uses: docker/build-push-action@v7
+ with:
+ context: .
+ push: true
+ platforms: linux/amd64,linux/arm64
+ tags: ${{ steps.set_vars.outputs.TAGS }}
+ build-args: |
+ NZBDAV_VERSION=${{ steps.set_vars.outputs.NZBDAV_VERSION }}
+ REPO_URL=https://github.com/${{ github.repository }}
\ No newline at end of file
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
index 71aea82a..17e16ce1 100644
--- a/.github/workflows/pre-release.yml
+++ b/.github/workflows/pre-release.yml
@@ -1,17 +1,16 @@
-name: "Deploy Pre-Release/Dev"
+name: "Deploy Pre-Release Images"
on:
push:
branches:
- - '**'
- - '!main'
- - '!dependabot/**'
+ - main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
+ if: "${{ !startsWith(github.event.head_commit.message, 'chore(main): release') }}"
permissions:
contents: read
@@ -34,18 +33,25 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v4
+ with:
+ registry: docker.io
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
- name: Set tags and NZBDAV_VERSION
id: set_vars
run: |
- RAW_REF="${{ github.ref_name }}"
- DOCKER_TAG=$(echo "$RAW_REF" \
- | tr '[:upper:]' '[:lower:]' \
- | sed -E 's#[^a-z0-9._-]+#-#g' \
- | sed -E 's#(^-+|-+$)##g')
- echo "DOCKER_TAG: $DOCKER_TAG"
- echo "NZBDAV_VERSION=${{ github.ref_name }}" >> $GITHUB_OUTPUT
GHCR_REPO="ghcr.io/${{ github.repository }}"
- echo "TAGS=${GHCR_REPO}:${DOCKER_TAG}" >> $GITHUB_OUTPUT
+ DOCKERHUB_REPO="nzbdav/nzbdav"
+ echo "NZBDAV_VERSION=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
+ {
+ echo "TAGS<<EOF"
+ echo "${GHCR_REPO}:pre-release"
+ echo "${DOCKERHUB_REPO}:pre-release"
+ echo "EOF"
+ } >> $GITHUB_OUTPUT
- name: Build and push Docker image (amd64 + arm64)
uses: docker/build-push-action@v7
@@ -56,4 +62,4 @@ jobs:
tags: ${{ steps.set_vars.outputs.TAGS }}
build-args: |
NZBDAV_VERSION=${{ steps.set_vars.outputs.NZBDAV_VERSION }}
- REPO_URL=https://github.com/${{ github.repository }}
\ No newline at end of file
+ REPO_URL=https://github.com/${{ github.repository }}