Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Jan 28, 2024
1 parent 335ff8b commit e954c68
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/mbtiles-to-pmtiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Convert mbtiles to pmtiles

on:
workflow_dispatch:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
env:
AREA: nova-scotia

steps:
# - name: Maximize build space
# uses: AdityaGarg8/remove-unwanted-software@v2
# with:
# remove-android: 'true'
# remove-dotnet: 'true'
# remove-haskell: 'true'
# remove-codeql: 'true'
# remove-docker-images: 'true'

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Fetch binaries
run: sudo mkdir /mnt/output && sudo chown runner:docker /mnt/output && wget --progress=dot:giga https://github.com/protomaps/go-pmtiles/releases/download/v1.13.0/go-pmtiles_1.13.0_Linux_x86_64.tar.gz && tar xvf go-pmtiles*

- name: Fetch tiles
env:
AWS_ENDPOINT_URL: https://ce5627cfc65c8b54d40bb91c0ba7298b.r2.cloudflarestorage.com
AWS_EC2_METADATA_DISABLED: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: aws s3 cp s3://hikes-public/"$AREA".mbtiles . --endpoint-url=https://ce5627cfc65c8b54d40bb91c0ba7298b.r2.cloudflarestorage.com

- name: pmtiles convert
run: pmtiles convert "$AREA".mbtiles /mnt/output/"$AREA".pmtiles

- name: Upload tiles
env:
AWS_ENDPOINT_URL: https://ce5627cfc65c8b54d40bb91c0ba7298b.r2.cloudflarestorage.com
AWS_EC2_METADATA_DISABLED: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: aws s3 cp --no-progress /mnt/output/"$AREA".pmtiles s3://hikes-public/"$AREA".pmtiles
5 changes: 1 addition & 4 deletions .github/workflows/tile-join.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Merge PMTiles into tiles.pmtiles
name: Merge multiple layers

on:
workflow_dispatch:
pull_request:

jobs:
build:
Expand Down Expand Up @@ -35,8 +34,6 @@ jobs:
run: aws s3 sync s3://hikes-public/layers/"$AREA"/ . --no-progress --endpoint-url=https://ce5627cfc65c8b54d40bb91c0ba7298b.r2.cloudflarestorage.com

- name: tile-join
env:
TILEMAKER: /tmp/tilemaker
run: /tmp/tile-join --no-tile-size-limit -o /mnt/output/tiles.mbtiles *.mbtiles

- name: Upload tiles
Expand Down

0 comments on commit e954c68

Please sign in to comment.