Skip to content

Commit

Permalink
[CI] Introduce GitHub Actions CI job for keyserver releases
Browse files Browse the repository at this point in the history
Summary:
This addresses [ENG-9048](https://linear.app/comm/issue/ENG-9048/github-action-to-generate-keyserver-docker-image).

We'll use the same image for keyserver, web, and landing.

For now, I'll continue to handle the creation of entries in the GitHub Releases page manually. This is how we do it for most workflows, with the exception of `desktop_release.yml`.

@will will follow-up with some changes here as part of [ENG-8839](https://linear.app/comm/issue/ENG-8839/determine-when-migrations-are-necessary-in-aws-deploysh).

Test Plan:
I'm not sure how to test this yet. I could land it and try testing from the master branch directly. From my research, it seems like the main alternative would be to test from a fork, but that would rewuire duplicating all relevant GitHub Secrets there

Reviewers: will

Subscribers:
  • Loading branch information
Ashoat committed Aug 19, 2024
1 parent 0632671 commit 900b264
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/keyserver_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build keyserver Docker image and upload to Docker Hub

on:
push:
tags:
- keyserver-**

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}

- name: Determine current keyserverCodeVersion
id: keyserver_code_version
run: |
echo "patch_version=`grep keyserverCodeVersion keyserver/src/version.js | sed -r 's/^[^0-9]*([0-9]+);$/\1/g'`" >> $GITHUB_OUTPUT
- name: Build and push Docker image
id: push
uses: docker/build-push-action
with:
context: .
file: ./keyserver/Dockerfile
push: true
tags: commapp/keyserver:1.0.${{steps.keyserver_code_version.outputs.patch_version}}
platforms:
- linux/arm64
build-args:
- HOST_GID=20
- HOST_UID=501
- COMM_JSONCONFIG_secrets_alchemy='{"key":"'"${{secrets.ALCHEMY_API_KEY}}"'"}'
- COMM_JSONCONFIG_secrets_walletconnect='{"key":"'"${{secrets.WALLETCONNECT_API_KEY}}"'"}'
- COMM_JSONCONFIG_secrets_neynar='{"key":"'"${{secrets.NEYNAR_API_KEY}}"'"}'
- COMM_JSONCONFIG_secrets_geoip_license='{"key":"'"${{secrets.GEOIP_LICENSE}}"'"}'

0 comments on commit 900b264

Please sign in to comment.