code to fix segmentation copy bug (#1038) #517
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: Deploy Changes to Cluster | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
prod: | |
name: deploy to production | |
runs-on: ubuntu-latest | |
if: github.repository == 'chanzuckerberg/napari-hub' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-west-2 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
role-duration-seconds: 900 | |
- name: Login to ECR | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ secrets.ECR_REPO }} | |
- name: Set up docker build environment | |
run: | | |
echo DOCKER_TAG=${GITHUB_REF_NAME} >> $GITHUB_ENV | |
- name: Deploy Changes to Prod | |
uses: chanzuckerberg/github-actions/.github/actions/deploy-happy-stack@v1.7.4 | |
env: | |
ENV: prod | |
with: | |
stack-name: "prod" | |
create-tag: "true" | |
tag: ${{ env.DOCKER_TAG }} | |
tfe-token: ${{ secrets.TFE_TOKEN }} | |
env: "prod" | |
operation: "create-or-update" | |
staging: | |
name: deploy to staging | |
runs-on: ubuntu-latest | |
if: github.repository == 'chanzuckerberg/napari-hub' && github.ref == 'refs/heads/main' | |
steps: | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-west-2 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
role-duration-seconds: 900 | |
- name: Login to ECR | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ secrets.ECR_REPO }} | |
- name: Set up docker build environment | |
run: | | |
echo STACK_NAME=${GITHUB_REF_NAME} >> $GITHUB_ENV | |
echo DOCKER_TAG=${GITHUB_REF_NAME} >> $GITHUB_ENV | |
- name: Deploy Changes to Staging | |
uses: chanzuckerberg/github-actions/.github/actions/deploy-happy-stack@v1.7.4 | |
env: | |
ENV: staging | |
with: | |
stack-name: "staging" | |
create-tag: "true" | |
tag: ${{ env.DOCKER_TAG }} | |
tfe-token: ${{ secrets.TFE_TOKEN }} | |
env: "staging" | |
operation: "create-or-update" |