Skip to content

Merge pull request #268 from ErfanSeidipoor/244-graphql-integration #129

Merge pull request #268 from ErfanSeidipoor/244-graphql-integration

Merge pull request #268 from ErfanSeidipoor/244-graphql-integration #129

Workflow file for this run

name: Development CI
on:
push:
branches: ["development"]
pull_request:
branches: [development]
jobs:
build-and-push-images:
if: github.ref == 'refs/heads/development'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build chatbot
run: |
echo BACK_URL=https://back-development.bright-resume.com > ./apps/chatbot/.env
echo MODE=develop >> ./apps/chatbot/.env
docker build -t ghcr.io/bright-co/bright-resume-chatbot:${{ github.sha }} -f infra/Dockerfile.chatbot .
- name: Build back-auth
run: docker build -t ghcr.io/bright-co/bright-resume-back-auth:${{ github.sha }} -f infra/Dockerfile.auth .
- name: Build back-resume
run: docker build -t ghcr.io/bright-co/bright-resume-back-resume:${{ github.sha }} -f infra/Dockerfile.resume .
- name: Build back-file
run: docker build -t ghcr.io/bright-co/bright-resume-back-file:${{ github.sha }} -f infra/Dockerfile.file .
- name: Build back-gateway
run: docker build -t ghcr.io/bright-co/bright-resume-back-gateway:${{ github.sha }} -f infra/Dockerfile.gateway .
- name: Build back-cms
run: docker build -t ghcr.io/bright-co/bright-resume-back-cms:${{ github.sha }} -f infra/Dockerfile.cms .
- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.G_TOKEN }}
- name: Push Images
run: |
docker push ghcr.io/bright-co/bright-resume-back-auth:${{ github.sha }}
docker push ghcr.io/bright-co/bright-resume-back-resume:${{ github.sha }}
docker push ghcr.io/bright-co/bright-resume-back-file:${{ github.sha }}
docker push ghcr.io/bright-co/bright-resume-back-gateway:${{ github.sha }}
docker push ghcr.io/bright-co/bright-resume-back-cms:${{ github.sha }}
docker push ghcr.io/bright-co/bright-resume-chatbot:${{ github.sha }}
update-manifest-stage:
if: github.ref == 'refs/heads/development'
runs-on: ubuntu-latest
needs: ["build-and-push-images"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: bright-co/bright-resume-gitops
ref: main
token: ${{ secrets.G_TOKEN }}
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "erfan"
- name: Update Image Tag
run: |
echo ${{ github.sha }}
sed -i "s|image: ghcr.io/bright-co/bright-resume-back-auth:.*|image: ghcr.io/bright-co/bright-resume-back-auth:${{ github.sha }}|" ./development/auth.yaml
sed -i "s|image: ghcr.io/bright-co/bright-resume-back-resume:.*|image: ghcr.io/bright-co/bright-resume-back-resume:${{ github.sha }}|" ./development/resume.yaml
sed -i "s|image: ghcr.io/bright-co/bright-resume-back-file:.*|image: ghcr.io/bright-co/bright-resume-back-file:${{ github.sha }}|" ./development/file.yaml
sed -i "s|image: ghcr.io/bright-co/bright-resume-back-gateway:.*|image: ghcr.io/bright-co/bright-resume-back-gateway:${{ github.sha }}|" ./development/gateway.yaml
sed -i "s|image: ghcr.io/bright-co/bright-resume-back-cms:.*|image: ghcr.io/bright-co/bright-resume-back-cms:${{ github.sha }}|" ./development/cms.yaml
sed -i "s|image: ghcr.io/bright-co/bright-resume-chatbot:.*|image: ghcr.io/bright-co/bright-resume-chatbot:${{ github.sha }}|" ./development/chatbot.yaml
git add -A
git commit -m "update image for - ${{ github.sha }}"
- name: Push Changes
run: git push