change port to 8080 #7
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: ecr | |
on: | |
push: | |
branches: | |
- master | |
env: | |
STACK_NAME: ${{ github.event.repository.name }} | |
AWS_DEFAULT_REGION: us-east-1 # ecr public is in us-east-1 | |
jobs: | |
Build: | |
name: build-prod | |
#if: "github.event.pull_request.merged || github.ref == 'refs/heads/master'" | |
#if: github.event.pull_request.merged | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }} | |
aws-region: ${{ env.AWS_DEFAULT_REGION }} | |
- name: Login to Amazon ECR Public | |
id: login-ecr-public | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Build, tag, and push docker image to Amazon ECR Public | |
env: | |
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
REGISTRY_ALIAS: seb-demo | |
REPOSITORY: eks-example-go | |
IMAGE_TAG: ${{ github.sha }} | |
run: | | |
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG . | |
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG | |
echo "::set-output name=image::$REGISTRY/$REGISTRY_ALIAS:$IMAGE_TAG" |