Merge multiple layers #24
This file contains 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: Merge multiple layers | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
# AREA: north-america | |
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 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: sudo mkdir /mnt/layers && sudo chown runner:docker /mnt/layers && cd /mnt/layers && aws s3 sync s3://hikes-public/layers/"$AREA"/ . --no-progress | |
- name: tile-join | |
run: ./bin/tile-join-docker --no-tile-size-limit -o tiles.mbtiles /mnt/layers/*.mbtiles | |
- 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 tiles.mbtiles s3://hikes-public/"$AREA".mbtiles |