Update Registry from Server #2260
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 Registry from Server | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '29 * * * *' | |
| jobs: | |
| update-registry: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "GitHub Actions Bot" | |
| git config --global user.email "actions@github.com" | |
| - name: Check for registry updates | |
| id: check_updates | |
| run: | | |
| if ! wget -q "https://dl.geotessera.org/v1/registry.tar.bz2" -O /tmp/registry.tar.bz2; then | |
| echo "Failed to download registry" | |
| exit 0 | |
| fi | |
| if ! tar -xf /tmp/registry.tar.bz2; then | |
| echo "Failed to extract registry archive" | |
| exit 0 | |
| fi | |
| - name: Create commit with geotessera-registry | |
| run: | | |
| uvx --from git+https://github.com/ucam-eo/geotessera@registry-commit geotessera-registry commit | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.ref }} |