Allocate memory in Workflow Executor (#65) #6
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: Build and Publish Remote-Vector-Index-Builder API Image to Docker | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'remote_vector_index_builder/app/**' | |
| - '.github/workflows/publish_remote_api_image.yml' | |
| workflow_call: # enables workflow to be reused | |
| secrets: | |
| REMOTE_VECTOR_DOCKER_USERNAME: | |
| required: true | |
| REMOTE_VECTOR_DOCKER_ROLE: | |
| required: true | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build-and-publish-api-image: | |
| name: Build and Publish Remote-Vector-Index-Builder API Image | |
| if: github.repository == 'opensearch-project/remote-vector-index-builder' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build Docker Image | |
| run : | | |
| docker build -f ./remote_vector_index_builder/app/Dockerfile . -t opensearchstaging/remote-vector-index-builder:api-1.0.0 | |
| docker tag opensearchstaging/remote-vector-index-builder:api-1.0.0 opensearchstaging/remote-vector-index-builder:api-latest | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.REMOTE_VECTOR_DOCKER_ROLE }} | |
| aws-region: us-east-1 | |
| - name: Retrieve Values | |
| id: retrieve-values | |
| run: | | |
| DOCKERHUB_PASSWORD=`aws secretsmanager get-secret-value --secret-id jenkins-staging-dockerhub-credential --query SecretString --output text` | |
| echo "::add-mask::$DOCKERHUB_PASSWORD" | |
| echo "dockerhub-password=$DOCKERHUB_PASSWORD" >> $GITHUB_OUTPUT | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.REMOTE_VECTOR_DOCKER_USERNAME }} | |
| password: ${{ steps.retrieve-values.outputs.dockerhub-password }} | |
| - name: Push Docker Image | |
| run : | | |
| docker push opensearchstaging/remote-vector-index-builder:api-1.0.0 | |
| docker push opensearchstaging/remote-vector-index-builder:api-latest | |
| - name: Runner Cleanups | |
| if: always() | |
| run: | | |
| docker logout |