Skip to content

Commit

Permalink
Add gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dakotabenjamin committed Jan 21, 2025
1 parent 91506d4 commit 293b93a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/img_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 🔧 Build CI Img

on:
# Push includes PR merge
push:
branches:
- master
- staging
- development
paths:
# Workflow is triggered only if deps change
- "Dockerfile"
# Allow manual trigger
workflow_dispatch:

jobs:
backend-ci-build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
build_target: ci
image_tags: |
"ghcr.io/${{ github.repository }}:ci-${{ github.ref_name }}"
invalidate-cache:
runs-on: ubuntu-latest
steps:
- name: Delete CI Img Cache
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete image-cache-${{ runner.os }} \
-R ${{ github.repository }} \
-B ${{ github.ref_name }} \
--confirm || true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM quay.io/mojodna/gdal:v2.3.x
LABEL maintainer="Seth Fitzsimmons <[email protected]>"
LABEL maintainer="[email protected]"

ARG http_proxy

Expand Down
6 changes: 3 additions & 3 deletions bin/process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ if [[ "$output" =~ ^s3:// ]]; then

>&2 echo "Uploading..."
update_status status "Uploading..."
aws s3 cp $intermediate "${output}.tif"
aws s3 cp $footprint "${output}.json"
aws s3 cp $thumb "${output}.png"
aws s3 cp --acl public-read $intermediate "${output}.tif"
aws s3 cp --acl public-read $footprint "${output}.json"
aws s3 cp --acl public-read $thumb "${output}.png"
else
mv $intermediate "${output}.tif"
mv $footprint "${output}.json"
Expand Down

0 comments on commit 293b93a

Please sign in to comment.