Skip to content

M2P-ETL-RELEASE

M2P-ETL-RELEASE #7

name: M2P-ETL-RELEASE
# trigger the workflow when someone creates a release
on:
create:
tag: 'v*'
jobs:
build:
# run the below steps on a fresh instance of a virtual environment
runs-on: ubuntu-latest
steps:
# fetch and checkout the current commit
- name: Checkout
uses: actions/checkout@v2
- name: Show GitHub Reference
run: |
echo ${GITHUB_REF:10}
# code smell the project
- name: Install Requirements
run: |
python3 -m pip install --upgrade pip
sudo apt-get install python3-setuptools
- name: Run Pylint
run: |
cp ./tests/.pylintrc .
cp ./tests/lint.py ./src/
pip3 install --no-cache-dir -r ./tests/requirements.txt
pip3 install --no-cache-dir -r requirements.txt
python3 ./src/lint.py --path ./src --threshold 9.5
- name: Dockerize
run: |
rm -f ./src/lint.py
docker build . --file Dockerfile --tag quay.io/psoseak/m2p-etl:${GITHUB_REF:10}
- name: Push To Registry
run: |
echo "${{ secrets.QUAY_IO_PASSWD }}" | docker login --username ${{ secrets.QUAY_IO_USERID }} --password-stdin quay.io
docker push quay.io/psoseak/m2p-etl:${GITHUB_REF:10}
docker logout