From 6cc91b5b73382706d4e606a69df62b503e09ab25 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Tue, 2 Jan 2024 14:33:59 -0500 Subject: [PATCH] Add concurrency & schedule for ci-snapshot.yml * No need in queued snapshot builds: the latest is enough * Build fresh snapshot every night --- .github/workflows/ci-snapshot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-snapshot.yml b/.github/workflows/ci-snapshot.yml index f5535448..ca049737 100644 --- a/.github/workflows/ci-snapshot.yml +++ b/.github/workflows/ci-snapshot.yml @@ -2,14 +2,24 @@ name: CI SNAPSHOT on: workflow_dispatch: + push: branches: - main - '*.x' + schedule: + - cron: '0 5 * * *' + +concurrency: + group: group-snapshot-for-${{ github.ref }} + cancel-in-progress: true + jobs: build-snapshot: uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@v1 + with: + gradleTasks: ${{ github.event_name == 'schedule' && '--rerun-tasks' || '' }} secrets: GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}