Skip to content

fix: main.yaml

fix: main.yaml #90

Workflow file for this run

name: Docker
on:
push:
branches:
- main
jobs:
Docker-main-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Images
run: |
docker build . --file Dockerfile --target build1 -t uri-image:latest
docker build . --file Dockerfile --target build2 -t api-image:latest
- name: push to dockerhub
run: |
docker login -u stefnie -p ${{ secrets.docker_hub_token }}
docker tag api-image:latest stefnie/api-image:latest
docker push stefnie/api-image:latest
docker tag uri-image:latest stefnie/uri-image:latest
docker push stefnie/uri-image:latest
Docker-compose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
docker-compose --version
- name: run containers
run: |
docker login -u stefnie -p ${{ secrets.docker_hub_token }}
docker-compose -f compose.yaml pull
docker-compose -f compose.yaml up -d