Skip to content

Commit

Permalink
feature add create ecs service #28
Browse files Browse the repository at this point in the history
  • Loading branch information
kynmh69 committed Mar 30, 2024
1 parent 18a403a commit 3a7971f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/docker-publish-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ on:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
paths:
- 'src/api/**'
- 'src/middleware/**'
- 'src/model/**'
- 'src/util/**'
- '.github/workflows/**'
pull_request:
branches: [ "main" ]
paths:
- 'src/api/**'
- 'src/middleware/**'
- 'src/model/**'
- 'src/util/**'
- '.github/workflows/**'

env:
# Use docker.io for Docker Hub if empty
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/docker-publish-key-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ on:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
paths:
- 'src/key_management/**'
- 'src/middleware/**'
- 'src/model/**'
- 'src/util/**'
- '.github/workflows/**'
pull_request:
branches: [ "main" ]
paths:
- 'src/key_management/**'
- 'src/middleware/**'
- 'src/model/**'
- 'src/util/**'
- '.github/workflows/**'

env:
# Use docker.io for Docker Hub if empty
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/docker-publish-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ on:
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
paths:
- 'src/**'
- 'src/updater/**'
- 'src/middleware/**'
- 'src/model/**'
- 'src/util/**'
- '.github/workflows/**'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'src/updater/**'
- 'src/middleware/**'
- 'src/model/**'
- 'src/util/**'
- '.github/workflows/**'
env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -234,15 +240,14 @@ jobs:

- name: Build, tag, and push image to Amazon ECR
id: build-image
working-directory: ${{ env.DOCKER_FILE }}
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ./docker/updater/Dockerfile
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 3a7971f

Please sign in to comment.