Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
luandro committed Feb 17, 2024
1 parent 98df480 commit c01c9c1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up environment variables for API key and Mapbox style
- name: Set up environment variables
run: |
if [ "${{ matrix.apikey_secret }}" != "" ]; then
echo "APIKEY=${{ secrets[matrix.apikey_secret] }}" >> $GITHUB_ENV
fi
if [ "${{ matrix.style }}" == "mapbox" ]; then
echo "MAPBOX_STYLE=${{ secrets.MAPBOX_STYLE }}" >> $GITHUB_ENV
fi
- name: Test run of Docker image with ${{ matrix.style }} style
[[ "${{ matrix.apikey_secret }}" ]] && echo "APIKEY=${{ secrets[matrix.apikey_secret] }}" >> $GITHUB_ENV
[[ "${{ matrix.style }}" == "mapbox" ]] && echo "MAPBOX_STYLE=${{ secrets.MAPBOX_STYLE }}" >> $GITHUB_ENV
- name: Test Docker image
run: |
docker run --rm -v ${{ github.workspace }}/outputs:/app/outputs ${{ needs.build-and-deploy.outputs.tags }} ${{ matrix.command }} --bounds "-54.28772,3.11460,-54.03630,3.35025" -Z ${{ matrix.style == 'planet' && '5' || '10' }} -f ${{ matrix.style }}-${{ needs.build-and-deploy.outputs.version }} ${{ env.MAPBOX_STYLE && '--mapboxstyle' || '' }} ${{ env.MAPBOX_STYLE || '' }} ${{ env.APIKEY && '--apikey' || '' }} ${{ env.APIKEY || '' }}
- name: Upload mbtiles artifacts
docker run --rm -v ${{ github.workspace }}/outputs:/app/outputs ${{ needs.build-and-deploy.outputs.tags }} ${{ matrix.command }} --bounds "-54.28772,3.11460,-54.03630,3.35025" -Z ${{ matrix.style == 'planet' && '5' || '10' }} -f ${{ matrix.style }}-${{ needs.build-and-deploy.outputs.version }} ${env.MAPBOX_STYLE:+--mapboxstyle $env.MAPBOX_STYLE} ${env.APIKEY:+--apikey $env.APIKEY}
- name: Upload mbtiles
uses: actions/upload-artifact@v2
with:
name: mbtiles-${{ needs.build-and-deploy.outputs.version }}
Expand Down

0 comments on commit c01c9c1

Please sign in to comment.