Merge pull request #511 from shawakash/indexes #4
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: Deploy backend-rs-api | |
on: | |
push: | |
branches: | |
- dev | |
paths: | |
- "backend/rs_api/**" | |
pull_request: | |
branches: | |
- dev | |
paths: | |
- "backend/rs_api/**" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: "mv docker/rs_api/Dockerfile ." | |
- name: add secrets | |
env: | |
DOCKER_USER: ${{secrets.DOCKERHUB_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKERHUB_TOKEN}} | |
run: | | |
cd backend/rs_api | |
touch .env | |
printf 'PORT=%s\n' "8080" >> .env | |
cd ../.. | |
- name: docker login | |
env: | |
DOCKER_USER: ${{secrets.DOCKERHUB_USERNAME}} | |
DOCKER_PASSWORD: ${{secrets.DOCKERHUB_TOKEN}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Build the Docker image | |
run: docker build . --tag shawakash/paybox-rs-api:${{ github.sha }} | |
- name: Docker Push | |
run: docker push shawakash/paybox-rs-api:${{ github.sha }} |