fix: allow doi or project name #73
This file contains hidden or 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: Tag and publish main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Remove line 65 to enable automated semantic version bumps. | |
| # Change line 71 from "if: false" to "if: true" to enable PyPI publishing. | |
| # Requires that svc-aindscicomp be added as an admin to repo. | |
| jobs: | |
| publish_image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Github Packages | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build image and push to GitHub Container Registry | |
| uses: docker/build-push-action@v3 | |
| with: | |
| # relative path to the place where source code with Dockerfile is located | |
| context: . | |
| push: true | |
| tags: ghcr.io/allenneuraldynamics/aind-metadata-viz:latest | |
| update_ecs_service : | |
| runs-on: ubuntu-latest | |
| needs: publish_image | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| AWS_IAM_ROLE: ${{ secrets.AWS_IAM_ROLE_PROD }} | |
| AWS_REGION : ${{ vars.AWS_REGION }} | |
| AWS_ECS_CLUSTER : ${{ vars.AWS_ECS_CLUSTER_PROD }} | |
| AWS_ECS_SERVICE : ${{ vars.AWS_ECS_SERVICE_PROD }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Configure aws credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| role-to-assume: ${{ env.AWS_IAM_ROLE }} | |
| role-session-name: github-ecs-update-service | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Update ECS service | |
| run: | | |
| python -m pip install awscli | |
| aws ecs update-service --cluster $AWS_ECS_CLUSTER --service $AWS_ECS_SERVICE --force-new-deployment |