diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 66f437b..2feade9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,3 +42,31 @@ jobs: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} + docker-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: internap/fake-switches + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: docker build + run: | + docker build . -t internap/fake-switches:latest + + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 9017163..d4f947f 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -4,7 +4,7 @@ name: Unit tests on: pull_request jobs: - build: + python-test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -14,7 +14,6 @@ jobs: tox_env: 'py27' - python-version: '3.5' tox_env: 'py35' - steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -29,3 +28,10 @@ jobs: run: | tox -e ${{ matrix.tox_env }} + docker-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: docker build + run: | + docker build . -t internap/fake-switches:latest