|
8 | 8 | - labeled |
9 | 9 |
|
10 | 10 | jobs: |
| 11 | + build-docker-image: |
| 12 | + # all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes. |
| 13 | + if: (github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'ok-to-test')) |
| 14 | + || (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved'))) |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v2 |
| 18 | + - name: Set up QEMU |
| 19 | + uses: docker/setup-qemu-action@v1 |
| 20 | + - name: Set up Docker Buildx |
| 21 | + uses: docker/setup-buildx-action@v1 |
| 22 | + - name: Set up AWS SDK |
| 23 | + uses: aws-actions/configure-aws-credentials@v1 |
| 24 | + with: |
| 25 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 26 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 27 | + aws-region: us-west-2 |
| 28 | + - name: Login to Amazon ECR |
| 29 | + id: login-ecr |
| 30 | + uses: aws-actions/amazon-ecr-login@v1 |
| 31 | + - name: Build and push |
| 32 | + env: |
| 33 | + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} |
| 34 | + ECR_REPOSITORY: feast-python-server |
| 35 | + IMAGE_TAG: ${{ github.sha }} |
| 36 | + run: | |
| 37 | + docker build \ |
| 38 | + --file sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile \ |
| 39 | + --tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \ |
| 40 | + . |
| 41 | + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG |
11 | 42 | integration-test-python: |
12 | 43 | # all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes. |
13 | 44 | if: (github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'ok-to-test')) |
14 | 45 | || (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved'))) |
| 46 | + needs: build-docker-image |
15 | 47 | runs-on: ${{ matrix.os }} |
16 | 48 | strategy: |
17 | 49 | fail-fast: false |
|
0 commit comments