Merge pull request #423 from aws/dependabot/go_modules/integration-te… #96
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
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_push_sample_app_image: | |
name: Build and Push Sample App docker image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create a directory | |
run: mkdir sample-apps/http-server/aws-xray-sdk-go | |
- name: Copy X-Ray SDK to deployment package with Sample App | |
run: rsync -r * sample-apps/http-server/aws-xray-sdk-go --exclude sample-apps/ | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layer | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.INTEG_TEST_AWS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.INTEG_TEST_AWS_KEY_SECRET }} | |
aws-region: us-east-1 | |
- name: Login to Public ECR | |
uses: docker/login-action@v1 | |
with: | |
registry: public.ecr.aws | |
- name: Build image and push to ECR | |
uses: docker/build-push-action@v2 | |
with: | |
file: sample-apps/http-server/Dockerfile | |
context: . | |
tags: public.ecr.aws/s6b4x8l3/aws-xray-go-sdk-sample-app:${{ github.sha }} | |
push: true |