From fea1e5c7f7c41dffee791cf19f4d435f1c6bb641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 5 Jul 2024 16:02:47 +0200 Subject: [PATCH] gha: nightly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- .github/workflows/ci.yml | 35 ---------------------------- .github/workflows/nightly.yml | 43 +++++++++++++++++++++++++++++++++++ deb/gen-deb-ver | 2 +- 3 files changed, 44 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 9ef7e269cb..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: ci - -on: - workflow_dispatch: - push: - branches: - - 'master' - - '[0-9]+.[0-9]{2}' - tags: - - 'v*' - pull_request: - -jobs: - build: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - target: - - debian-bullseye - - debian-bookworm - - ubuntu-focal - - ubuntu-jammy - - ubuntu-noble - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Build - run: | - make ${{ matrix.target }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000000..9586db90c1 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,43 @@ +name: nightly + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: {} + +jobs: + build: + runs-on: selfhosted + strategy: + fail-fast: false + matrix: + target: + - debian-bookworm + steps: + #- + # name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + + - + name: Checkout + uses: actions/checkout@v3 + + - + name: Build + run: | + export VERSION=master + export REF=master + + export DOCKER_BUILDX_REF=master + + export DOCKER_COMPOSE_REF=main + + make ${{ matrix.target }} + + - + name: Artifact + uses: actions/upload-artifact@v4 + with: + name: nightly-${{ matrix.target }} + path: deb/debbuild/${{ matrix.target }} + retention-days: 3 diff --git a/deb/gen-deb-ver b/deb/gen-deb-ver index bb5aaf4717..aae01a5c71 100755 --- a/deb/gen-deb-ver +++ b/deb/gen-deb-ver @@ -30,7 +30,7 @@ debVersion="${debVersion//-/$tilde}" # if we have a "-dev" suffix or have change in Git, this is a nightly build, and # we'll create a pseudo version based on commit-date and -sha. -if [[ "$VERSION" == *-dev ]] || [ -n "$($GIT_COMMAND status --porcelain)" ]; then +if [[ "$VERSION" == *-dev ]] || [ "$VERSION" == "master" ] || [ "$VERSION" == "main" ] || [ -n "$($GIT_COMMAND status --porcelain)" ]; then export TZ=UTC # based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4