Update GeoLite #261
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 GeoLite | |
| on: | |
| repository_dispatch: | |
| workflow_dispatch: | |
| schedule: | |
| # Run every day | |
| - cron: 0 2 */1 * * | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| - name: Update GeoLite | |
| run: nix run '.#geolite2.passthru.updateScript' | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet pkgs/geolite2.nix; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "refactor(pkgs/geolite2): update database" | |
| title: "refactor(pkgs/geolite2): update database" | |
| body: | | |
| Automated update of GeoLite2 database. | |
| This PR was automatically created by the scheduled workflow. | |
| branch: update-geolite2 | |
| delete-branch: true |