Update country packages #1062
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update country packages | |
| on: | |
| schedule: | |
| - cron: "*/30 * * * *" # Every 30 minutes | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update: | |
| name: Update ${{ matrix.package }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package: [policyengine-us, policyengine-uk] | |
| fail-fast: false | |
| steps: | |
| - name: Generate GitHub App token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Setup Python | |
| run: uv python install 3.13 | |
| - name: Check for update and open PR | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| chmod +x .github/scripts/update-package.sh | |
| .github/scripts/update-package.sh ${{ matrix.package }} |