File: check-financial-holiday-updates.yml

package info (click to toggle)
python-holidays 0.90-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 59,088 kB
  • sloc: python: 121,956; javascript: 85; makefile: 62
file content (58 lines) | stat: -rw-r--r-- 2,070 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Check financial holiday updates

on:
  schedule:
    - cron: '0 0 2 11 *' # Run yearly on Nov 2nd at 00:00 UTC
  workflow_dispatch:
    inputs:
      dry_run:
        description: 'Run in dry-run mode (no issues created)'
        required: false
        default: true
        type: boolean
      paths:
        description: 'Multiline list of paths/globs to check (one per line, leave empty for default)'
        required: false
        default: ''
        type: string
      threshold_days:
        description: 'Age threshold for files in days'
        required: false
        default: '300'
        type: string

permissions:
  contents: read
  issues: write

jobs:
  check-financial-updates:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout holidays repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
        with:
          fetch-depth: 0 # Get full commit history to accurately determine when each file was last modified
          repository: vacanza/holidays
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Check financial holiday updates
        id: check-financial-updates
        uses: vacanza/aux/.github/actions/check-holiday-updates@46f7899c8ed2178d1f5f019d9c88a4b1db503060
        with:
          dry_run: ${{ inputs.dry_run || false }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          paths: ${{ inputs.paths || 'holidays/financial/*.py' }}
          threshold_days: ${{ inputs.threshold_days || '300' }}

      - name: Display results
        run: |
          echo "📊 Check Financial Holiday Updates Results:"
          echo "  • Outdated files found: ${{ steps.check-financial-updates.outputs.outdated_files_count }}"
          echo "  • Issues created: ${{ steps.check-financial-updates.outputs.issues_created_count }}"

          if [ "${{ steps.check-financial-updates.outputs.outdated_files_count }}" -gt "0" ]; then
            echo "⚠️  Some holiday files may need updating!"
          else
            echo "✅ All holiday files are up to date!"
          fi