forked from migumax/cd_example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cd_config.yml
33 lines (30 loc) · 938 Bytes
/
cd_config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Python Package
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@master
- name: Initialize Python 3.8
uses: actions/setup-python@v1
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check docker installed or not
run: docker run hello-world
- name: Push to docker hub
uses: docker/build-push-action/@v1
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
repository: ${{secrets.DOCKERHUB_REPO}}
tag_with_ref: true