Fix Environment Variables #7
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: Build and push Docker images | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- src/** | |
- .github/workflows/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull source code | |
uses: actions/checkout@v1 | |
- name: Build API image | |
run: docker build src/api/ --file src/api/Dockerfile --tag robinmanuelthiel/microcommunication-api:$(date +%s) --tag robinmanuelthiel/microcommunication-api:latest | |
- name: Build Random image | |
run: docker build src/random/ --file src/random/Dockerfile --tag robinmanuelthiel/microcommunication-random:$(date +%s) --tag robinmanuelthiel/microcommunication-random:latest | |
- name: Build Web image | |
run: docker build src/web/ --file src/web/Dockerfile --tag robinmanuelthiel/microcommunication-web:$(date +%s) --tag robinmanuelthiel/microcommunication-web:latest | |
- name: Login to Docker Hub | |
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push API image | |
run: docker push robinmanuelthiel/microcommunication-api | |
- name: Push Random image | |
run: docker push robinmanuelthiel/microcommunication-random | |
- name: Push Web image | |
run: docker push robinmanuelthiel/microcommunication-web |