fix: syntax, Docker CMD #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |