Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Run Docker Compose

Run Docker Compose #13

Workflow file for this run

name: Run Docker Compose
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: [self-hosted, donggle-dev]
steps:
- uses: actions/checkout@v3
- name: create .env
run: |
touch .env
echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> .env
echo "SPRING_PROFILES_ACTIVE=${{ vars.SPRING_PROFILES_ACTIVE_DEVELOPMENT }}" >> .env
echo "INFRA_PROFILE=${{ vars.INFRA_PROFILE_DEVELOPMENT }}" >> .env
## deploy to production
- name: Deploy to prod
run: |
sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
sudo chmod +x deploy.sh
sudo ./deploy.sh ${{ vars.INFRA_PROFILE_DEVELOPMENT }}
sudo docker image prune -af