From 726867a57758e96d5c22d4e80c6bb3b6bc9d9662 Mon Sep 17 00:00:00 2001 From: AGC <158510532+AlvaroGlezC@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:33:21 +0200 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fe85b5..149e06f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,3 +155,23 @@ jobs: # az container start --name syg-frontend --resource-group syg-demo # az container start --name syg-prometheus --resource-group syg-demo # az container start --name syg-grafana --resource-group syg-demo + + deployment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push images + run: | + docker build -f ./docker/database-mysql.Dockerfile -t alvaro251891/syg-docker-db:0.1.0-SNAPSHOT ./docker + docker push alvaro251891/syg-docker-db:0.1.0-SNAPSHOT + + - name: Start Docker containers + run: docker run --name syg-docker-db -d alvaro251891/syg-docker-db:0.1.0-SNAPSHOT +