Skip to content

Commit

Permalink
gha
Browse files Browse the repository at this point in the history
  • Loading branch information
dtuchs committed Jun 20, 2024
1 parent 3bf8ede commit 3f7de5e
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: e2e

on:
push:
branches-ignore:
- master
jobs:
deploy-services:
runs-on: self-hosted
- name: Check changes path
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
auth:
- 'rococo-auth/**'
api:
- 'rococo-api/**'
client:
- 'rococo-client/**'
- name: Docker login
run: |
docker login --username ${{ vars.DOCKER_HUB_ACC }} --password "${{ secrets.DOCKER_HUB_PASSWORD }}"
- name: build auth & deploy to staging
if: steps.changes.outputs.auth == 'true'
working-directory: ./
run: |
pwd
bash ./gradlew :rococo-auth:jib -Pskipjaxb -x :rococo-e2e:test
docker-compose pull auth.rococo.dc
docker-compose stop auth.rococo.dc && docker-compose up -d --no-deps auth.rococo.dc
docker system prune -a -f
echo "Deploy auth to stage done!"
- name: build currency & deploy to staging
if: steps.changes.outputs.api == 'true'
working-directory: ./
run: |
pwd
bash ./gradlew :rococo-api:jib -Pskipjaxb -x :rococo-e2e:test
docker-compose pull api.rococo.dc
docker-compose stop api.rococo.dc && docker-compose up -d --no-deps api.rococo.dc
docker system prune -a -f
echo "Deploy api to stage done!"
- name: build frontend & deploy to staging
if: steps.changes.outputs.client == 'true'
working-directory: ./rococo-client
run: |
pwd
docker build -t ${{ vars.DOCKER_HUB_ACC }}/rococo-client:0.0.1-SNAPSHOT -t ${{ vars.DOCKER_HUB_ACC }}/rococo-client:latest .
docker push ${{ vars.DOCKER_HUB_ACC }}/rococo-client:0.0.1-SNAPSHOT
docker push ${{ vars.DOCKER_HUB_ACC }}/rococo-client:latest
cd ../ || exit 1
docker-compose pull client.rococo.dc
docker-compose stop client.rococo.dc && docker-compose up -d --no-deps client.rococo.dc
docker system prune -a -f
echo "Deploy frontend to stage done!"

0 comments on commit 3f7de5e

Please sign in to comment.