Skip to content

Commit 780f464

Browse files
committed
feat: Deploy to docker hub on release, #44
1 parent fd76257 commit 780f464

2 files changed

Lines changed: 23 additions & 28 deletions

File tree

.github/workflows/hub.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,26 @@ jobs:
9999
- run: heroku git:remote -a $HEROKU_APP
100100
- run: git push heroku HEAD:refs/heads/master
101101
- run: rm -r -f .netrc
102+
103+
docker-build-push:
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: Login to Docker Hub
107+
uses: docker/login-action@v2
108+
with:
109+
username: ${{ secrets.DOCKERHUB_USERNAME }}
110+
password: ${{ secrets.DOCKERHUB_TOKEN }}
111+
- name: Checkout the repository
112+
uses: actions/checkout@v1
113+
- name: Create temporary env variables
114+
# Replace these files with actual values during
115+
# runtime on 'docker-compose up'
116+
run: |
117+
cp client/.env.example client/.env
118+
cp server/.env.example server/.env
119+
- name: Set release version number
120+
run: find "docker-compose.prod.yml" -type f exec sed -i "s/latest/${{ github.event.release.tag_name }}" {} \;
121+
- name: Build Images
122+
run: docker-compose -f docker-compose.prod.yml build
123+
- name: Push Images to Docker Hub
124+
run: docker-compose -f docker-compose.prod.yml push

0 commit comments

Comments
 (0)