pull/213/merge
James Hewitt 2023-03-29 20:28:01 -07:00 committed by GitHub
commit 2a7b0d68dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 1 deletions

View File

@ -1,6 +1,12 @@
dist: xenial dist: xenial
language: python language: python
services:
- docker
env:
- DOCKER_REGISTRY=docker.io DOCKER_REPOSITORY=huashengdun/webssh
python: python:
- "3.8" - "3.8"
- "3.9" - "3.9"
@ -14,6 +20,26 @@ install:
script: script:
- pytest --cov=webssh - pytest --cov=webssh
- flake8 - flake8
after_success: after_success:
- codecov - codecov
jobs:
include:
- stage: deploy
script: docker build -t webssh:build .
deploy:
- provider: script
script: >-
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker tag webssh:build "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:latest" &&
docker push "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:latest"
on:
branch: master
- provider: script
script: >-
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" &&
docker tag webssh:build "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:$TRAVIS_TAG" &&
docker push "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:$TRAVIS_TAG"
on:
tags: true