diff --git a/.github/workflows/docker_build_and_push.yml b/.github/workflows/build_tag_publish.yml similarity index 71% rename from .github/workflows/docker_build_and_push.yml rename to .github/workflows/build_tag_publish.yml index b874de18..ca153769 100644 --- a/.github/workflows/docker_build_and_push.yml +++ b/.github/workflows/build_tag_publish.yml @@ -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 @@ -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: | @@ -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' diff --git a/.gitignore b/.gitignore index 434a734c..dd32c116 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ env.properties *~ .DS_Store /.bsp/sbt.json + +# Ignore generated credentials from google-github-actions/auth +gha-creds-*.json