Added credentials in order for pip to access cicd private repo #6
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: Deployment workflow | |
on: | |
push: | |
paths: | |
- 'examples/github/train.py' | |
- 'examples/github/titanic_test_data.csv' | |
- 'examples/github/requirements.txt' # temporarily | |
- '.github/workflows/giskard_action.yaml' # temporarily | |
jobs: | |
Deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: checkout repo content | |
uses: actions/checkout@v4 # checkout the repository content to github runner | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # install the python version needed | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
with: | |
requirement_files: examples/github/requirements.txt # this is optional | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install -r examples/github/requirements.txt | |
env: | |
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }} | |
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} | |
EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }} | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: training | |
run: | | |
python examples/github/train.py | |
- name: execute pipeline | |
run: | | |
python cli.py --loader github --model examples/github/artifacts/model --dataset examples/github/artifacts/dataset --output_format markdown |