Skip to content

Commit 61b49e1

Browse files
Add GitHub Actions workflow for building and pushing STAC Browser image
1 parent 164b087 commit 61b49e1

File tree

2 files changed

+73
-6
lines changed

2 files changed

+73
-6
lines changed

.github/workflows/stac-browser.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build STAC Browser
2+
3+
on:
4+
release:
5+
types: [released]
6+
workflow_dispatch:
7+
inputs:
8+
TAG_NAME:
9+
description: "Tag name for this image"
10+
required: true
11+
default: "eoapi-k8s-stac-browser"
12+
STAC_BROWSER_VERSION:
13+
description: "STAC Browser version to build (e.g. v3.3.4)"
14+
required: true
15+
default: "v3.3.4"
16+
17+
env:
18+
REGISTRY: ghcr.io
19+
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
20+
21+
jobs:
22+
build-and-push:
23+
runs-on: ubuntu-latest
24+
name: Build and push STAC Browser image
25+
26+
steps:
27+
- name: Checkout STAC Browser repository
28+
uses: actions/checkout@v4
29+
with:
30+
repository: radiantearth/stac-browser
31+
ref: ${{ github.event.inputs.STAC_BROWSER_VERSION }}
32+
33+
- name: Set environment variables
34+
run: |
35+
echo VERSION=${TAG_NAME#v} >> $GITHUB_ENV
36+
echo IMAGE_NAME=$REGISTRY/$(echo ${GITHUB_REPOSITORY,,})/stac-browser >> $GITHUB_ENV
37+
echo COMMITED_AT=$(git show -s --format=%cI `git rev-parse HEAD`) >> $GITHUB_ENV
38+
echo REVISION=$(git rev-parse --short HEAD) >> $GITHUB_ENV
39+
40+
- name: Collect Docker image metadata
41+
id: meta
42+
uses: docker/metadata-action@v5
43+
with:
44+
images: ${{ env.IMAGE_NAME }}
45+
labels: |
46+
org.opencontainers.image.created=${{ env.COMMITED_AT }}
47+
org.opencontainers.image.version=v${{ env.VERSION }}
48+
org.opencontainers.image.maintainer=${{ github.repository_owner }}
49+
tags: |
50+
type=semver,pattern={{version}},value=v${{ env.VERSION }}
51+
52+
- name: Log in to the GitHub container registry
53+
uses: docker/login-action@v3
54+
with:
55+
registry: ${{ env.REGISTRY }}
56+
username: ${{ github.repository_owner }}
57+
password: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Build and push Docker image
60+
uses: docker/build-push-action@v5
61+
with:
62+
context: .
63+
push: true
64+
build-args: |
65+
VERSION=${{ env.VERSION }}
66+
REVISION=${{ env.REVISION }}
67+
pathPrefix=/browser/
68+
tags: ${{ steps.meta.outputs.tags }}
69+
labels: ${{ steps.meta.outputs.labels }}
70+
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:edge
71+
cache-to: type=inline

helm-chart/eoapi/values.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ comment_install: >
1414
# the correct updated value otherwise it's defaulted
1515
gitSha: "gitshaABC123"
1616

17-
1817
######################
1918
# TESTING
2019
######################
@@ -31,7 +30,6 @@ serviceAccount:
3130
annotations: {}
3231
labels: {}
3332

34-
3533
######################
3634
# SERVICE & INGRESS
3735
######################
@@ -61,7 +59,6 @@ ingress:
6159
certManagerIssuer: letsencrypt-prod
6260
certManagerEmail: ""
6361

64-
6562
######################
6663
# DATABASE
6764
######################
@@ -186,7 +183,6 @@ pgstacBootstrap:
186183
# toggle to "false" if you don't want fixtures default loaded
187184
LOAD_FIXTURES: "true"
188185

189-
190186
######################
191187
# API SERVICES
192188
######################
@@ -469,8 +465,8 @@ browser:
469465
enabled: true
470466
replicaCount: 1
471467
image:
472-
# we use a custom image that overrides pathPrefix value
473-
name: ghcr.io/radiantearth/stac-browser
468+
# we use a custom image with pathPrefix built into it
469+
name: ghcr.io/developmentseed/eoapi-k8s-stac-browser
474470
tag: 3.3.4
475471
ingress:
476472
enabled: true # Control ingress specifically for browser service

0 commit comments

Comments
 (0)