Skip to content

Commit

Permalink
separate deployment ymls for time savings
Browse files Browse the repository at this point in the history
  • Loading branch information
threnjen committed Oct 15, 2024
1 parent 2add131 commit 187254b
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 68 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/dev_deployment_ecs_scraper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: DEV deployment to boardgamegeek scraper

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, push image to AWS ECR game_data_scraper
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: boardgamegeek_scraper_dev
run: |
DOCKER_BUILDKIT=1 docker build -f Dockerfiles/Dockerfile.game-data-scraper --build-arg GROUP="group1" -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, push image to AWS ECR game_data_scraper
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: boardgamegeek_scraper_dev
run: |
DOCKER_BUILDKIT=1 docker build -f Dockerfiles/Dockerfile.game-data-scraper --build-arg GROUP="group1" -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY
- name: Build, tag, push image to AWS ECR boardgamegeek_cleaner
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/prod_deployment.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/prod_deployment_ecs_bgg_file_retrieval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PROD deployment to boardgamegeek scraper

on:
push:
branches:
- main

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, push image to AWS ECR bgg_boardgame_file_retrieval
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: bgg_boardgame_file_retrieval
run: |
DOCKER_BUILDKIT=1 docker build -f Dockerfiles/Dockerfile.bgg_boardgame_file_retrieval -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY
32 changes: 32 additions & 0 deletions .github/workflows/prod_deployment_ecs_cleaner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PROD deployment to boardgamegeek scraper

on:
push:
branches:
- main

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, push image to AWS ECR boardgamegeek_cleaner
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: boardgamegeek_cleaner
run: |
DOCKER_BUILDKIT=1 docker build -f Dockerfiles/Dockerfile.game-data-cleaner --build-arg GROUP="group1" -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY
36 changes: 36 additions & 0 deletions .github/workflows/prod_deployment_ecs_orchestrator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PROD deployment to boardgamegeek scraper

on:
push:
branches:
- main

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, push image to AWS ECR boardgamegeek_cleaner
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: bgg_orchestrator
run: |
DOCKER_BUILDKIT=1 docker build -f Dockerfiles/Dockerfile.bgg_orchestrator --build-arg ENV="prod" --build-arg ASSET="all" -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY
35 changes: 35 additions & 0 deletions .github/workflows/prod_deployment_ecs_scraper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PROD deployment to boardgamegeek scraper

on:
push:
branches:
- main

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, push image to AWS ECR boardgamegeek_scraper
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: boardgamegeek_scraper
run: |
DOCKER_BUILDKIT=1 docker build -f Dockerfiles/Dockerfile.game-data-scraper --build-arg GROUP="group1" -t $ECR_REGISTRY/$ECR_REPOSITORY .
docker push $ECR_REGISTRY/$ECR_REPOSITORY

0 comments on commit 187254b

Please sign in to comment.