Skip to content

Commit c685b57

Browse files
committed
fixing workflow
1 parent 2de164c commit c685b57

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed
Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
name: model-deploy-on-release
22
on:
33
release:
4-
types: [published]
5-
jobs:
6-
run:
7-
runs-on: [ubuntu-latest]
8-
container: docker://dvcorg/cml-py3:latest
9-
steps:
10-
- uses: actions/checkout@v2
11-
- name: 'Train and Evaluate model'
12-
shell: bash
13-
env:
14-
repo_token: ${{ secrets.GITHUB_TOKEN }}
15-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
16-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17-
CRED_SECRET: ${{ secrets.IBM_CREDENTIALS_PASS }}
18-
run: |
19-
# Install requirements
20-
pip install -r requirements.txt
21-
22-
# Pull data & run-cache from S3 and reproduce pipeline
23-
dvc pull --run-cache
24-
dvc repro
25-
26-
# Decrypt credentials file
27-
gpg --quiet --batch --yes --decrypt --passphrase="$CRED_SECRET" --output credentials.yaml credentials.yaml.gpg
28-
29-
# Check if there is a deployment already, if positive update it, otherwise deploys it for the first time
30-
./src/scripts/Scripts/git_release_pipeline.sh
4+
types:
5+
- 'published'
6+
7+
jobs:
8+
run:
9+
runs-on: [ubuntu-latest]
10+
container: docker://dvcorg/cml-py3:latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: 'Deploy/Update on new release'
15+
16+
shell: bash
17+
18+
env:
19+
repo_token: ${{ secrets.GITHUB_TOKEN }}
20+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
21+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22+
CRED_SECRET: ${{ secrets.IBM_CREDENTIALS_PASS }}
23+
24+
run: |
25+
# Install requirements
26+
pip install -r requirements.txt
27+
28+
# Pull data & run-cache from S3 and reproduce pipeline
29+
dvc pull --run-cache
30+
dvc repro
31+
32+
# Decrypt credentials file
33+
gpg --quiet --batch --yes --decrypt --passphrase="$CRED_SECRET" --output credentials.yaml credentials.yaml.gpg
34+
35+
# Check if there is a deployment already, if positive update it, otherwise deploys it for the first time
36+
./src/scripts/Scripts/git_release_pipeline.sh
3137
3238

0 commit comments

Comments
 (0)