extsdk-container build and test #81
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: extsdk-container build and test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
# Allow for manually running | |
workflow_dispatch: | |
# Run at 02:12 UTC every Saturday | |
schedule: | |
- cron: '12 2 * * 6' | |
jobs: | |
build-test-deploy: | |
runs-on: ubuntu-latest | |
env: | |
REPO: crops/extsdk-container | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v4 | |
# Build the image | |
- name: build | |
run: docker build -t ${REPO} . | |
# Test the image | |
- name: test | |
run: | | |
pip install pytest | |
pytest --testimage=$REPO | |
# Deploy the images | |
- name: deploy | |
run: bash deploy.sh |