From 1ab4b93bcc1be7452d0057a491c9076d0771dc1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Wed, 17 Jun 2026 22:13:02 +0200 Subject: [PATCH] CI: add option not rebuild federal initiatives --- .github/workflows/build-feeds.yml | 32 ++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-feeds.yml b/.github/workflows/build-feeds.yml index b09f963..ae5cc53 100644 --- a/.github/workflows/build-feeds.yml +++ b/.github/workflows/build-feeds.yml @@ -21,6 +21,11 @@ on: required: false default: "false" type: boolean + ignoreFederalPopularInitiativesFeed: + description: "skip federal initiatives feed generation" + required: false + default: "false" + type: boolean jobs: build: @@ -59,20 +64,21 @@ jobs: - name: Generate feeds for federal popular initiatives run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then - echo "Running in VERBOSE mode" - resspublica --verbose --gen_federalInitiatives - else - resspublica --gen_federalInitiatives + if ! [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.ignoreFederalPopularInitiativesFeed }}" = "true"]; then + if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then + echo "Running in VERBOSE mode" + resspublica --verbose --gen_federalInitiatives + else + resspublica --gen_federalInitiatives + fi + git add feed/ .cache/ + + if git diff --cached --quiet; then + echo "No changes to commit" + exit 0 + fi + git commit -m "feeds: federal popular initiatives update $(date -u +%Y-%m-%d)" fi - git add feed/ .cache/ - - if git diff --cached --quiet; then - echo "No changes to commit" - exit 0 - fi - git commit -m "feeds: federal popular initiatives update $(date -u +%Y-%m-%d)" - - name: Generate feeds for asian hornets sighting in Bern run: | if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then