bump 0.367.0 #1290
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update devs ui image | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- develop | |
paths: | |
- '!*' | |
- 'src/**' | |
- 'package.json' | |
- 'cypress.json' | |
- 'cypress/**' | |
- 'Dockerfile' | |
- '.github/workflows/dev-image-update.yaml' | |
env: | |
gcr_google_project: 'broad-jade-dev' | |
google_sdk_version: '290.0.1' | |
DEV_PROJECT: broad-jade-dev | |
# This must be defined for the bash redirection | |
GOOGLE_APPLICATION_CREDENTIALS: 'jade-dev-account.json' | |
# This must be defined for the bash redirection | |
GOOGLE_SA_CERT: 'jade-dev-account.pem' | |
jobs: | |
update_image: | |
outputs: | |
ui_image_tag: ${{ steps.bumperstep.outputs.tag }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
if: "!contains( github.event.sender.login, 'broadbot')" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: develop | |
token: ${{ secrets.BROADBOT_TOKEN }} | |
- name: 'Bump the tag to a new version' | |
uses: broadinstitute/datarepo-actions/actions/[email protected] | |
id: bumperstep | |
with: | |
actions_subcommand: 'bumper' | |
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }} | |
version_file_path: package.json | |
version_variable_name: version | |
GITHUB_TOKEN: ${{ secrets.BROADBOT_TOKEN }} | |
- name: 'Get gcp credentials' | |
uses: broadinstitute/datarepo-actions/actions/[email protected] | |
with: | |
actions_subcommand: 'skip' | |
sa_b64_credentials: ${{ secrets.SA_B64_CREDENTIALS }} | |
- name: 'Pull down new tags' | |
run: git fetch --all --tags | |
- name: 'Get Previous tag' | |
id: uiprevioustag | |
uses: 'broadinstitute/github-action-get-previous-tag@master' | |
env: | |
GITHUB_TOKEN: '${{ secrets.BROADBOT_TOKEN }}' | |
- name: Build nmp build for new ui container | |
run: | | |
git pull | |
GCR_TAG=$(git rev-parse --short HEAD) | |
echo "GCR_TAG=$(echo ${GCR_TAG})" >> $GITHUB_ENV | |
# Build the Docker image | |
- name: Build docker container | |
env: | |
DISABLE_ESLINT_PLUGIN: true | |
run: | | |
rm -rf jade-dev-account.pem | |
docker build -t gcr.io/${{ env.gcr_google_project }}/jade-data-repo-ui:${GCR_TAG} --build-arg CACHEBUST=$(date +%s) . | |
# Push the Docker image to Google Container Registry | |
- name: Publish and tag new docker container to GCR | |
run: | | |
gcloud auth activate-service-account --key-file jade-dev-account.json | |
gcloud auth configure-docker --quiet | |
docker push gcr.io/${{ env.gcr_google_project }}/jade-data-repo-ui:${GCR_TAG} | |
gcloud container images \ | |
add-tag \ | |
gcr.io/${{ env.gcr_google_project }}/jade-data-repo-ui:"${GCR_TAG}" \ | |
gcr.io/${{ env.gcr_google_project }}/jade-data-repo-ui:"${{ steps.uiprevioustag.outputs.tag }}" --quiet | |
gcloud container images \ | |
add-tag \ | |
gcr.io/${{ env.gcr_google_project }}/jade-data-repo-ui:"${GCR_TAG}" \ | |
gcr.io/${{ env.gcr_google_project }}/jade-data-repo-ui:"${GCR_TAG}-develop" --quiet | |
helm_tag_bump: | |
needs: update_image | |
uses: ./.github/workflows/helmtagbump.yaml | |
secrets: inherit | |
cherry_pick_image_to_production_gcr: | |
needs: update_image | |
uses: DataBiosphere/jade-data-repo/.github/workflows/[email protected] | |
secrets: inherit | |
with: | |
gcr_tag: ${{ needs.update_image.outputs.ui_image_tag }} | |
source_gcr_url: 'gcr.io/broad-jade-dev/jade-data-repo-ui' | |
target_gcr_url: 'gcr.io/datarepo-public-gcr/jade-data-repo-ui' |