Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dhenkel92 committed May 4, 2024
1 parent c7eb161 commit ccc955a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 62 deletions.
5 changes: 0 additions & 5 deletions .github/scripts/auth.sh

This file was deleted.

34 changes: 16 additions & 18 deletions .github/workflows/consumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ on:
push:
branches:
- main
- fix-ci
paths:
- '.github/workflows/consumer.yml'
- '.github/scripts/auth.sh'
- '.github/scripts/deploy.sh'
- 'async-server-provisioner/*'
- 'async-server-provisioner/*/*'
- 'async-server-provisioner/*/*/*'
- 'async-server-provisioner/*/*/*/*'
- 'async-server-provisioner/*/*/*/*/*'
- 'infrastructure/terraform/02-game-server/**/*'
- ".github/workflows/consumer.yml"
- ".github/scripts/auth.sh"
- ".github/scripts/deploy.sh"
- "async-server-provisioner/*"
- "async-server-provisioner/*/*"
- "async-server-provisioner/*/*/*"
- "async-server-provisioner/*/*/*/*"
- "async-server-provisioner/*/*/*/*/*"
- "infrastructure/terraform/02-game-server/**/*"

name: Cloud Game Consumer

Expand All @@ -20,17 +21,14 @@ jobs:
name: Build Consumer
runs-on: ubuntu-latest
env:
IMAGE: 220002198733.dkr.ecr.eu-central-1.amazonaws.com/cloud-game/consumer
IMAGE: cloudgame/async-server-provisioner
steps:
- uses: actions/checkout@master
- name: Authenticate
# if: github.ref == 'refs/heads/main'
run: ./.github/scripts/auth.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-central-1
ECR_ACCOUNT: 220002198733.dkr.ecr.eu-central-1.amazonaws.com
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Container
run: |
docker build -t $IMAGE:$GITHUB_RUN_ID -f async-server-provisioner/Dockerfile .
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/react-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ on:
push:
branches:
- main
- fix-ci
paths:
- '.github/workflows/react-frontend.yml'
- '.github/scripts/auth.sh'
- '.github/scripts/deploy.sh'
- 'react-frontend/*'
- 'react-frontend/*/*'
- 'react-frontend/*/*/*'
- 'react-frontend/*/*/*/*'
- 'react-frontend/*/*/*/*/*'
- ".github/workflows/react-frontend.yml"
- ".github/scripts/auth.sh"
- ".github/scripts/deploy.sh"
- "react-frontend/*"
- "react-frontend/*/*"
- "react-frontend/*/*/*"
- "react-frontend/*/*/*/*"
- "react-frontend/*/*/*/*/*"

name: Cloud Game React Frontend

Expand All @@ -19,16 +20,14 @@ jobs:
name: Build React Frontend
runs-on: ubuntu-latest
env:
IMAGE: 220002198733.dkr.ecr.eu-central-1.amazonaws.com/cloud-game/react/frontend
IMAGE: cloudgame/frontend
steps:
- uses: actions/checkout@master
- name: Authenticate
run: ./.github/scripts/auth.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-central-1
ECR_ACCOUNT: 220002198733.dkr.ecr.eu-central-1.amazonaws.com
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Container
run: |
cd react-frontend
Expand Down
41 changes: 18 additions & 23 deletions .github/workflows/strapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ on:
push:
branches:
- main
- fix-ci
paths:
- '.github/workflows/strapi.yml'
- '.github/scripts/auth.sh'
- '.github/scripts/deploy.sh'
- 'backend/**/*'
- ".github/workflows/strapi.yml"
- ".github/scripts/auth.sh"
- ".github/scripts/deploy.sh"
- "backend/**/*"

name: Cloud Game Backend Strapi

Expand All @@ -15,17 +16,14 @@ jobs:
name: Build Strapi API
runs-on: ubuntu-latest
env:
IMAGE: 220002198733.dkr.ecr.eu-central-1.amazonaws.com/cloud-game/strapi/backend
IMAGE: cloudgame/backend-api
steps:
- uses: actions/checkout@master
- name: Authenticate
# if: github.ref == 'refs/heads/main'
run: ./.github/scripts/auth.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-central-1
ECR_ACCOUNT: 220002198733.dkr.ecr.eu-central-1.amazonaws.com
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Container
run: |
docker build -t $IMAGE:$GITHUB_RUN_ID -f backend/Dockerfile-prod-be .
Expand All @@ -39,23 +37,20 @@ jobs:
name: Build Strapi Frontend
runs-on: ubuntu-latest
env:
IMAGE: 220002198733.dkr.ecr.eu-central-1.amazonaws.com/cloud-game/strapi/frontend
IMAGE: cloudgame/backend-admin
steps:
- uses: actions/checkout@master
- name: Authenticate
# if: github.ref == 'refs/heads/main'
run: ./.github/scripts/auth.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-central-1
ECR_ACCOUNT: 220002198733.dkr.ecr.eu-central-1.amazonaws.com
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Container
run: |
cd backend
docker build -t $IMAGE:$GITHUB_RUN_ID -f Dockerfile-prod-fe --build-arg ADMIN_URL=${ADMIN_URL} --build-arg SERVER_URL=${SERVER_URL} .
env:
ADMIN_URL: https://admin.cloud-game.app/
ADMIN_URL: /
SERVER_URL: https://api.cloud-game.app/
- name: Push Container
run: |
Expand Down

0 comments on commit ccc955a

Please sign in to comment.