From 27bc4cd25c90802252de8daad747a84e820cecb8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 21:40:06 +0800 Subject: [PATCH] Add automated nightly release workflow (#915) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: louislam <1336778+louislam@users.noreply.github.com> Co-authored-by: Louis Lam --- .github/workflows/nightly-release.yml | 52 +++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/nightly-release.yml diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml new file mode 100644 index 0000000..2b28672 --- /dev/null +++ b/.github/workflows/nightly-release.yml @@ -0,0 +1,52 @@ +name: Nightly Release + +on: + schedule: + # Runs at 2:00 AM UTC every day + - cron: "0 2 * * *" + workflow_dispatch: # Allow manual trigger + +permissions: {} + +jobs: + release-nightly: + runs-on: ubuntu-latest + timeout-minutes: 120 + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + + - name: Use Node.js 22 + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install dependencies + run: npm clean-install --no-fund + + - name: Run release-nightly + run: npm run release-nightly diff --git a/package.json b/package.json index c5123b2..8e26353 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "build:docker-base": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:base -f ./docker/Base.Dockerfile . --push", "build:docker": "node ./extra/env2arg.js docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:latest -t louislam/dockge:1 -t louislam/dockge:$VERSION -t louislam/dockge:beta -t louislam/dockge:nightly --target release -f ./docker/Dockerfile . --push", "build:docker-beta": "node ./extra/env2arg.js docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:beta -t louislam/dockge:$VERSION --target release -f ./docker/Dockerfile . --push", - "build:docker-nightly": "npm run build:frontend && docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:nightly --target nightly -f ./docker/Dockerfile . --push", "build:healthcheck": "docker buildx build -f docker/BuildHealthCheck.Dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:build-healthcheck . --push", + "release-nightly": "npm run build:frontend && docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:nightly -t ghcr.io/louislam/dockge:nightly --target nightly -f ./docker/Dockerfile . --push", "start-docker": "docker run --rm -p 5001:5001 --name dockge louislam/dockge:latest", "mark-as-nightly": "tsx ./extra/mark-as-nightly.ts", "reformat-changelog": "tsx ./extra/reformat-changelog.ts",