SRTM Check #24
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
| # | |
| # This workflow checks if SRTM15+ has a new release. | |
| # If a new release if found, it will open an issue automatically. | |
| # | |
| # Based on https://github.com/GenericMappingTools/gmt/blob/master/.github/workflows/scm-check.yml | |
| # | |
| name: SRTM Check | |
| on: | |
| # uncomment the 'pull_request' line to enable testing in PRs | |
| #pull_request: | |
| schedule: | |
| # weekly cron job | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| srtm-check: | |
| name: SRTM Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check that the srtm source file exists | |
| id: srtm | |
| run: | | |
| srtm_version="SRTM15_V2.4.nc" | |
| srtm_src="https://topex.ucsd.edu/pub/srtm15_plus/${srtm_version}" | |
| # Check if the file exists on the server | |
| echo "::set-output name=srtm_version::${srtm_version}" | |
| if curl --output /dev/null --silent --head --fail "$srtm_src"; then | |
| echo "Source file ${srtm_src} exists." | |
| else | |
| echo "Source file ${srtm_src} does not exist. There may have been a new release" | |
| echo "::set-output name=error_code::2" | |
| fi | |
| - name: Create an update request for srtm | |
| if: ${{ steps.srtm.outputs.error_code == 2 }} | |
| uses: nashmaniac/[email protected] | |
| with: | |
| title: Current SRTM15+ version ${{ steps.srtm.outputs.srtm_version }} not found | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| body: | | |
| The source file for the SRTM15+ datasets was not found, possibly due to a new release. | |
| - current version: ${{ steps.srtm.outputs.srtm_version }} | |
| To-do list: | |
| - [ ] Check https://topex.ucsd.edu/pub/srtm15_plus/ for a new release | |
| - [ ] Update `recipes/earth_relief.recipe` with the new file name and version | |
| - [ ] Run `make earth-relief` from the `gmtserver-admin` top dir | |
| - [ ] Copy `staging/earth_relief_server.txt` to `information/` | |
| - [ ] Run `make server-info` from the `gmtserver-admin` top dir | |
| - [ ] Place the new `earth_relief` files on the GMT 'test' data server | |
| - [ ] Test the new files (e.g., https://github.com/GenericMappingTools/remote-datasets/blob/main/scripts/remote_map_check.sh) | |
| - [ ] Update `srtm_version` in `.github/workflows/srtm-check.yml` | |
| - [ ] Commit changes in a new branch and open a PR | |
| - [ ] Move files to GMT 'oceania' data server before merging PR | |
| - name: Check that the synbath source file exists | |
| id: synbath | |
| run: | | |
| synbath_version="SYNBATH_V1.2.nc" | |
| synbath_src="https://topex.ucsd.edu/pub/synbath/${synbath_version}" | |
| # Check if the file exists on the server | |
| echo "::set-output name=synbath_version::${synbath_version}" | |
| if curl --output /dev/null --silent --head --fail "$synbath_src"; then | |
| echo "Source file ${synbath_src} exists." | |
| else | |
| echo "Source file ${synbath_src} does not exist. There may have been a new release" | |
| echo "::set-output name=error_code::2" | |
| fi | |
| - name: Create an update request for synbath | |
| if: ${{ steps.synbath.outputs.error_code == 2 }} | |
| uses: nashmaniac/[email protected] | |
| with: | |
| title: Current SYNBATH version ${{ steps.synbath.outputs.synbath_version }} not found | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| body: | | |
| The source file for the synbath datasets was not found, possibly due to a new release. | |
| - current version: ${{ steps.synbath.outputs.synbath_version }} | |
| To-do list: | |
| - [ ] Check https://topex.ucsd.edu/pub/synbath/ for a new release | |
| - [ ] Update `recipes/earth_synbath.recipe` with the new file name and version | |
| - [ ] Run `make earth-synbath` from the `gmtserver-admin` top dir | |
| - [ ] Copy `staging/earth_synbath_server.txt` to `information/` | |
| - [ ] Run `make server-info` from the `gmtserver-admin` top dir | |
| - [ ] Place the new `earth_synbath` files on the GMT 'test' data server | |
| - [ ] Test the new files (e.g., https://github.com/GenericMappingTools/remote-datasets/blob/main/scripts/remote_map_check.sh) | |
| - [ ] Update `synbath_version` in `.github/workflows/synbath-check.yml` | |
| - [ ] Commit changes in a new branch and open a PR | |
| - [ ] Move files to GMT 'oceania' data server before merging PR |