Skip to content

Commit

Permalink
Presentation with Nexer
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeschke committed Mar 16, 2023
1 parent 7243c5c commit 2a18d36
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1

- name: Build, tag, and push docker image to Amazon ECR Public
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_PUBLIC_API: ${{ secrets.ECR_PUBLIC_API }}
REPOSITORY: "api"
IMAGE_TAG: "latest"
run: |
docker build --tag $REPOSITORY:$IMAGE_TAG .
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_PUBLIC_API
docker tag $REPOSITORY:$IMAGE_TAG $ECR_PUBLIC_API:$IMAGE_TAG
docker push $ECR_PUBLIC_API:$IMAGE_TAG

0 comments on commit 2a18d36

Please sign in to comment.