CI: add option not rebuild federal initiatives

This commit is contained in:
2026-06-17 22:13:16 +02:00
parent 9ca5b80d7a
commit 1ab4b93bcc
+19 -13
View File
@@ -21,6 +21,11 @@ on:
required: false required: false
default: "false" default: "false"
type: boolean type: boolean
ignoreFederalPopularInitiativesFeed:
description: "skip federal initiatives feed generation"
required: false
default: "false"
type: boolean
jobs: jobs:
build: build:
@@ -59,20 +64,21 @@ jobs:
- name: Generate feeds for federal popular initiatives - name: Generate feeds for federal popular initiatives
run: | run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then if ! [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.ignoreFederalPopularInitiativesFeed }}" = "true"]; then
echo "Running in VERBOSE mode" if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then
resspublica --verbose --gen_federalInitiatives echo "Running in VERBOSE mode"
else resspublica --verbose --gen_federalInitiatives
resspublica --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 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 - name: Generate feeds for asian hornets sighting in Bern
run: | run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.verbose }}" = "true" ]; then