From 6e94b74be4eae0b995505dee179c4771455d85b5 Mon Sep 17 00:00:00 2001 From: Matthieu Gouel Date: Sat, 18 Nov 2023 14:38:24 +0100 Subject: [PATCH] add docker/pypi workflow --- .github/workflows/tests.yml | 40 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d39c008..b46ddf2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,25 +17,23 @@ jobs: run: poetry run pytest --cov=metatrace --cov-report=xml --log-cli-level=INFO - uses: codecov/codecov-action@v3 -# Uncomment when public -# docker: -# needs: [test] -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# - uses: dioptra-io/publish-docker-action@v1 -# with: -# password: ${{ secrets.GITHUB_TOKEN }} -# platforms: linux/amd64,linux/arm64 -# push: ${{ github.actor != 'dependabot[bot]' }} + docker: + needs: [test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dioptra-io/publish-docker-action@v1 + with: + password: ${{ secrets.GITHUB_TOKEN }} + platforms: linux/amd64,linux/arm64 + push: ${{ github.actor != 'dependabot[bot]' }} -# Set PYPI_PASSWORD and uncomment when public -# pypi: -# needs: [test] -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# - uses: dioptra-io/publish-python-action@v1 -# with: -# password: ${{ secrets.PYPI_PASSWORD }} -# upload: ${{ startsWith(github.ref, 'refs/tags/v') }} + pypi: + needs: [test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dioptra-io/publish-python-action@v1 + with: + password: ${{ secrets.PYPI_PASSWORD }} + upload: ${{ startsWith(github.ref, 'refs/tags/v') }}