Skip to content

Nightly Release

Nightly Release #32

name: Nightly Release
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build-images:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push images
uses: docker/build-push-action@v6
with:
context: .
build-args: |
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
TIPI_VERSION=nightly
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/runtipi/runtipi:nightly
cache-from: type=registry,ref=ghcr.io/runtipi/runtipi:buildcache
cache-to: type=registry,ref=ghcr.io/runtipi/runtipi:buildcache,mode=max
build-cli:
runs-on: ubuntu-latest
steps:
- name: Dispatch an action and get the run ID
uses: codex-/return-dispatch@v2
id: return_dispatch
with:
token: ${{ secrets.PAT_CLI }}
ref: develop
repo: cli
owner: runtipi
workflow: nightly.yml
- name: Await Run ID ${{ steps.return_dispatch.outputs.run_id }}
uses: Codex-/[email protected]
with:
token: ${{ secrets.PAT_CLI }}
repo: cli
owner: runtipi
run_id: ${{ steps.return_dispatch.outputs.run_id }}
run_timeout_seconds: 1200
poll_interval_ms: 5000
- name: Create bin folder
run: mkdir -p bin
- name: Download CLI form release on runtipi/cli repo
run: |
REPO="runtipi/cli"
VERSION="nightly"
ASSETS_URL=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$REPO/releases/tags/$VERSION" \
| jq -r '.assets[] | select(.name | test("runtipi-cli.+")) | .browser_download_url')
echo "Assets URL: $ASSETS_URL"
for url in $ASSETS_URL; do
echo "Downloading from $url"
curl -L -o "bin/${url##*/}" -H "Accept: application/octet-stream" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$url"
done
- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: cli
path: bin
update-release:
runs-on: ubuntu-latest
needs: [build-images, build-cli]
steps:
- name: Download CLI
uses: actions/download-artifact@v4
with:
name: cli
path: cli
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly
rm: true
files: cli/runtipi-cli-*
e2e-tests:
needs: [update-release]
uses: "./.github/workflows/e2e.yml"
secrets: inherit
with:
version: nightly