Skip to content

Commit

Permalink
[WX-1868] Report new versions to Sherlock using GHA (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
salonishah11 authored Sep 26, 2024
1 parent 6a337ad commit 32cc217
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
name: 'Agora build and push'
name: 'Build tag and publish'

on:
workflow_dispatch:
merge_group:
pull_request:
paths-ignore: [ '**.md' ]
push:
branches: [ develop ]
paths-ignore: [ '**.md' ]

jobs:
build-and-push:
build-and-push-job:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
outputs:
tag: ${{ steps.tag.outputs.tag }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -50,8 +56,8 @@ jobs:
- name: Construct Dockerhub and GCR image names
id: image-name
run: |
echo "DOCKERHUB_NAME=broadinstitute/agora:${{ steps.tag.outputs.new_tag }}" >> $GITHUB_OUTPUT
echo "GCR_NAME=gcr.io/broad-dsp-gcr-public/agora:${{ steps.tag.outputs.new_tag }}" >> $GITHUB_OUTPUT
echo "DOCKERHUB_NAME=broadinstitute/agora:${{ steps.tag.outputs.tag }}" >> $GITHUB_OUTPUT
echo "GCR_NAME=gcr.io/broad-dsp-gcr-public/agora:${{ steps.tag.outputs.tag }}" >> $GITHUB_OUTPUT
- name: Build image
run: |
Expand Down Expand Up @@ -86,3 +92,28 @@ jobs:

- name: Push GCR image
run: docker push ${{ steps.image-name.outputs.GCR_NAME }}

report-to-sherlock:
# Report new Agora version to Sherlock and hence Beehive
uses: broadinstitute/sherlock/.github/workflows/client-report-app-version.yaml@main
needs: [ build-and-push-job ]
with:
new-version: ${{ needs.build-and-push-job.outputs.tag }}
chart-name: 'agora'
permissions:
contents: 'read'
id-token: 'write'

set-version-in-dev:
# Put new Agora version in dev environment
uses: broadinstitute/sherlock/.github/workflows/client-set-environment-app-version.yaml@main
needs: [ build-and-push-job, report-to-sherlock ]
if: ${{ github.ref_name == 'develop' }}
with:
new-version: ${{ needs.build-and-push-job.outputs.tag }}
chart-name: 'agora'
environment-name: 'dev'
secrets:
sync-git-token: ${{ secrets.BROADBOT_TOKEN }}
permissions:
id-token: 'write'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ env.properties
*~
.DS_Store
/.bsp/sbt.json

# Ignore generated credentials from google-github-actions/auth
gha-creds-*.json

0 comments on commit 32cc217

Please sign in to comment.