@@ -103,52 +103,35 @@ jobs:
103103 strategy :
104104 matrix :
105105 include :
106- - os : windows-latest
107- TARGET : windows
108- CMD_BUILD : python -m PyInstaller --clean --workpath /tmp/build --specpath /tmp -F ./app/truth_seeker.py
109- OUT_FILE_NAME : truth_seeker.exe
110- ASSET_MIME : application/vnd.microsoft.portable-executable
111106 - os : ubuntu-latest
112- TARGET : ubuntu
113- CMD_BUILD : python -m PyInstaller --clean --workpath /tmp/build --specpath /tmp -F ./app/truth_seeker.py
114- OUT_FILE_NAME : truth_seeker
115- ASSET_MIME : application/x-binary
107+ SERVICENAME : news_db
108+ CONTAINERFILE : Containerfile-db
109+ - os : ubuntu-latest
110+ SERVICENAME : truth_seeker
111+ CONTAINERFILE : Containerfile-ts
112+ - os : ubuntu-latest
113+ SERVICENAME : datapath
114+ CONTAINERFILE : Containerfile-dp
116115
117116 steps :
118117
119- - name : Checkout code
120- uses : actions/checkout@v2
121-
122- - name : Set up Python 3.9
123- uses : actions/setup-python@v2
118+ - name : Login to DockerHub
119+ uses : docker/login-action@v1
124120 with :
125- python-version : 3.9
126-
127- - name : Install dependencies
128- run : |
129- python -m pip install --upgrade pip
130- pip install -r requirements.txt
131-
132- - name : Build with pyinstaller for ${{ matrix.TARGET }}
133- run : ${{ matrix.CMD_BUILD }}
121+ username : ${{ secrets.DOCKER_USERNAME }}
122+ password : ${{ secrets.DOCKER_TOKEN }}
134123
135- - name : Upload Artifacts
136- uses : actions/upload-artifact@v3
137- with :
138- name : ${{ matrix.OUT_FILE_NAME }}
139- path : ./dist/${{ matrix.OUT_FILE_NAME }}
140- retention-days : 1
124+ - name : Checkout code
125+ uses : actions/checkout@v2
141126
142- - name : Upload Release Asset
143- id : upload-release-asset
144- uses : actions/upload-release-asset@v1
145- env :
146- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
127+ - name : Build and push
128+ id : push_image
129+ uses : docker/build-push-action@v2
147130 with :
148- upload_url : ${{ needs.release.outputs.get_release_url }}
149- asset_path : ./dist/${{ matrix.OUT_FILE_NAME }}
150- asset_name : ${{ matrix.OUT_FILE_NAME }}
151- asset_content_type : ${{ matrix.ASSET_MIME }}
131+ context : .
132+ push : true
133+ file : ${{ matrix.CONTAINERFILE }}
134+ tags : h0d0user/ ${{ matrix.SERVICENAME }}:latest
152135
153136 - name : Notify if failure
154137 if : ${{ failure() }}
@@ -186,6 +169,11 @@ jobs:
186169
187170 Branch: ${{ github.ref }}
188171
172+ <b>Pushed image:</b> <code>docker pull h0d0user/news_db:latest</code>,
173+ <code>docker pull h0d0user/truth_seeker:latest</code>,
174+ <code>docker pull h0d0user/datapath:latest</code>
175+ See changes: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
176+
189177 <b>Release URL:</b> https://github.com/${{ github.repository }}/releases/tag/${{ needs.prepare.outputs.get_current_tag }}
190178
191179 See changes: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
0 commit comments