From df2da49efb917da2b3466cb8d508b1ca6fc55f54 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Fri, 16 Apr 2021 14:52:19 +0200 Subject: Create docker-image.yml First try for a yaml file to automatize the build and push of a docker image--- .github/workflows/docker-image.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/docker-image.yml (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..c0298502 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,25 @@ +# code created with help of the github documentation : https://docs.github.com/en/actions/guides/publishing-docker-images + +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build-and-push: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to Docker Hub + uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} #we can set these secrets with admin rights, so the code will adapt to the dockerHub account used + password: ${{ secrets.DOCKER_PASSWORD }} + repository: keleran/sec-certs #for now I wrote my repo + tag_with_ref: true -- cgit v1.3.1 From 27486822202b50b2dd1cdf2dc95d143671b1ae25 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Fri, 16 Apr 2021 15:17:37 +0200 Subject: Update docker-image.yml switch to v2 of build-push action as asked by the warning--- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c0298502..7500554d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -17,7 +17,7 @@ jobs: - name: Check out the repo uses: actions/checkout@v2 - name: Push to Docker Hub - uses: docker/build-push-action@v1 + uses: docker/build-push-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} #we can set these secrets with admin rights, so the code will adapt to the dockerHub account used password: ${{ secrets.DOCKER_PASSWORD }} -- cgit v1.3.1 From e1fa06edf8f3157fb7c90bc036ce1a80a31b9eb7 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Fri, 16 Apr 2021 15:37:47 +0200 Subject: Create python-publish.yml Attempt to add a github action to publish a PyPI package on each release.--- .github/workflows/python-publish.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/python-publish.yml (limited to '.github/workflows') diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 00000000..088bc13d --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,31 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} #Same as Docker, need to add an account in the secrets + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* -- cgit v1.3.1 From f5d2eebfe806761f74ac5ac00b8bc74c12ce1de3 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Mon, 19 Apr 2021 14:20:32 +0200 Subject: Update python-publish.yml calls the publisher on each push--- .github/workflows/python-publish.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 088bc13d..0f442307 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,9 +3,7 @@ name: Upload Python Package -on: - release: - types: [created] +on: [push] jobs: deploy: -- cgit v1.3.1 From 4770f7d4aa81235d6053ede19e46a90004af61ca Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Tue, 20 Apr 2021 11:19:14 +0200 Subject: Create GA_CI.yml First attempt to use GitHub actions instead of Travis CI--- .github/workflows/GA_CI.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/GA_CI.yml (limited to '.github/workflows') diff --git a/.github/workflows/GA_CI.yml b/.github/workflows/GA_CI.yml new file mode 100644 index 00000000..1a3231e5 --- /dev/null +++ b/.github/workflows/GA_CI.yml @@ -0,0 +1,24 @@ +name: tests +on: + push: + branches: + - master + - dev + +jobs: + name: Set env up + runs-on: ubuntu-latest + steps: + - run: apt-get install poppler-utils + - uses: actions/checkout@v2 + - name : Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install python dependencies + run: pip install -r requirements.txt + - name : Install pytest and run scripts like Travis does + run: | + pip install pytest + pip install pytest-cov + pytest test -- cgit v1.3.1 From d0252bad41d78877b0912dd070677b6fde2daacc Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Tue, 20 Apr 2021 11:21:22 +0200 Subject: Update GA_CI.yml Corrected syntax errors--- .github/workflows/GA_CI.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/GA_CI.yml b/.github/workflows/GA_CI.yml index 1a3231e5..22c334c5 100644 --- a/.github/workflows/GA_CI.yml +++ b/.github/workflows/GA_CI.yml @@ -6,19 +6,19 @@ on: - dev jobs: - name: Set env up - runs-on: ubuntu-latest - steps: - - run: apt-get install poppler-utils - - uses: actions/checkout@v2 - - name : Setup python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install python dependencies - run: pip install -r requirements.txt - - name : Install pytest and run scripts like Travis does - run: | - pip install pytest - pip install pytest-cov - pytest test + run-test: + runs-on: ubuntu-latest + steps: + - run: apt-get install poppler-utils + - uses: actions/checkout@v2 + - name : Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install python dependencies + run: pip install -r requirements.txt + - name : Install pytest and run scripts like Travis does + run: | + pip install pytest + pip install pytest-cov + pytest test -- cgit v1.3.1 From 11078d51591f5a9ce344915e8178fede502f6dfe Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Wed, 21 Apr 2021 10:23:27 +0200 Subject: Update GA_CI.yml Modify the event that triggers the workflow, now it will run on each push everywhere--- .github/workflows/GA_CI.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/GA_CI.yml b/.github/workflows/GA_CI.yml index 22c334c5..25f9c7b8 100644 --- a/.github/workflows/GA_CI.yml +++ b/.github/workflows/GA_CI.yml @@ -1,9 +1,6 @@ name: tests -on: - push: - branches: - - master - - dev +on: [push] + jobs: run-test: -- cgit v1.3.1 From 5a9841c2668a6e09617b6d20fe07a822cc18042d Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Wed, 21 Apr 2021 10:34:08 +0200 Subject: Update GA_CI.yml sudo might be needed to install an apt package--- .github/workflows/GA_CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/GA_CI.yml b/.github/workflows/GA_CI.yml index 25f9c7b8..e26b2562 100644 --- a/.github/workflows/GA_CI.yml +++ b/.github/workflows/GA_CI.yml @@ -6,7 +6,7 @@ jobs: run-test: runs-on: ubuntu-latest steps: - - run: apt-get install poppler-utils + - run: sudo apt-get install poppler-utils - uses: actions/checkout@v2 - name : Setup python uses: actions/setup-python@v2 -- cgit v1.3.1 From 1b637cbb3b287e5607e78a2be4153eee6b8aa846 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Wed, 21 Apr 2021 11:13:20 +0200 Subject: Update python-publish.yml The build seems to work well, modify the rules to publish the package when a push or PR on master occurs--- .github/workflows/python-publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 0f442307..fb2b2323 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,7 +3,11 @@ name: Upload Python Package -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: deploy: -- cgit v1.3.1 From 0558f03b36b4e9f93d99c450860c061c2dce0186 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Wed, 21 Apr 2021 11:16:00 +0200 Subject: Update GA_CI.yml pytest didn't find the sec_certs code, adding a line that was in travis.yml--- .github/workflows/GA_CI.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/GA_CI.yml b/.github/workflows/GA_CI.yml index e26b2562..d4b00ff6 100644 --- a/.github/workflows/GA_CI.yml +++ b/.github/workflows/GA_CI.yml @@ -18,4 +18,5 @@ jobs: run: | pip install pytest pip install pytest-cov + pip install ".[dev,test]" pytest test -- cgit v1.3.1 From 0d5882cc8c2a09601111659cd85ddca8b6d31d31 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Wed, 21 Apr 2021 11:55:09 +0200 Subject: Update docker-image.yml Revision of the code thanks to the reviews, we'll now only use the official method.--- .github/workflows/docker-image.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7500554d..d8b8f5a0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,19 +7,27 @@ on: branches: [ master ] pull_request: branches: [ master ] - + jobs: - - build-and-push: - name: Push Docker image to Docker Hub + docker: runs-on: ubuntu-latest steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Push to Docker Hub + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_LOGIN }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - + name: Build and push + id: docker_build uses: docker/build-push-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} #we can set these secrets with admin rights, so the code will adapt to the dockerHub account used - password: ${{ secrets.DOCKER_PASSWORD }} - repository: keleran/sec-certs #for now I wrote my repo - tag_with_ref: true + push: true + tags: user/app:latest -- cgit v1.3.1 From 88707e8abf413a9c22d3bf4191354777225d0403 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Fri, 23 Apr 2021 11:08:48 +0200 Subject: Update GA_CI.yml Forcing 3.8 version of Python to ensure compatibility--- .github/workflows/GA_CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/GA_CI.yml b/.github/workflows/GA_CI.yml index d4b00ff6..3239468f 100644 --- a/.github/workflows/GA_CI.yml +++ b/.github/workflows/GA_CI.yml @@ -11,7 +11,7 @@ jobs: - name : Setup python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.8' - name: Install python dependencies run: pip install -r requirements.txt - name : Install pytest and run scripts like Travis does -- cgit v1.3.1 From 8d3b03c02fa550d6c73e5993797ffce4efc66afa Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Fri, 23 Apr 2021 11:11:36 +0200 Subject: Update python-publish.yml Forcing 3.8 for compatibility purpose--- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index fb2b2323..22f85fe2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.8' - name: Install dependencies run: | python -m pip install --upgrade pip -- cgit v1.3.1 From f61d3db18d7b9803d648281d1444b915cdcc8484 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 11:18:52 +0200 Subject: test manual dispatch of GitHub Actions --- .github/workflows/docker-image.yml | 21 +++++++++------------ README.md | 5 ++++- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d8b8f5a0..d76ffc16 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -4,28 +4,25 @@ name: Docker Image CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] - + branches: [master] + workflow_dispatch: + jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_LOGIN }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Build and push + - name: Build and push id: docker_build uses: docker/build-push-action@v2 with: diff --git a/README.md b/README.md index b956b44d..35078d09 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,13 @@ Tool for analysis of security certificates and their security targets (Common Cr This project is developed by the [Centre for Research On Cryptography and Security](https://crocs.fi.muni.cz) at Faculty of Informatics, Masaryk University. +[![Website seccerts.org](https://img.shields.io/website-up-down-green-red/http/monip.org.svg)](http://seccerts.org/) +[![PyPI version sec-certs](https://badge.fury.io/py/ansicolortags.svg)](https://pypi.org/project/sec-certs/) +[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ansicolortags.svg)](https://pypi.python.org/pypi/sec-certs/) +![GitHub actions tests](https://github.com/crocs-muni/sec-certs/actions/workflows/GA_CI.yml/badge.svg) ## Installation (CC) - The tool requires several Python packages as well as the `pdftotext` binary somewhere on the `PATH`. The easiest way to setup the tool is to install it in a virtual environment, e.g.: Install Python virtual environment (if not yet): -- cgit v1.3.1 From 5c043f881c547654d254cf4b461bc56a69291b04 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 11:24:11 +0200 Subject: fix docker username --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d76ffc16..f9a77ee8 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -20,7 +20,7 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_LOGIN }} + username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and push id: docker_build -- cgit v1.3.1 From 961b603b09667eabe445c360044aaf4afe789c4b Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 11:49:48 +0200 Subject: fix docker hub repo name --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f9a77ee8..d23e1ef1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -27,4 +27,4 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: user/app:latest + tags: seccerts/sec-certs:tagname -- cgit v1.3.1 From cdcdac9d6ede6db0191a1f4a88a51528dd4d1638 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 11:59:31 +0200 Subject: test action to get version name --- .github/workflows/get_version.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/get_version.yml (limited to '.github/workflows') diff --git a/.github/workflows/get_version.yml b/.github/workflows/get_version.yml new file mode 100644 index 00000000..804739db --- /dev/null +++ b/.github/workflows/get_version.yml @@ -0,0 +1,10 @@ +name: get-version +on: [push, workflow_dispatch] + +steps: + - id: get_version + uses: battila7/get-version-action@v2 + + - run: echo ${{ steps.get_version.outputs.version }} + + - run: echo ${{ steps.get_version.outputs.version-without-v }} -- cgit v1.3.1 From 5764b440019a00090043908dfbc5f1e4b3b91c17 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 12:01:19 +0200 Subject: do not get version --- .github/workflows/get_version.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .github/workflows/get_version.yml (limited to '.github/workflows') diff --git a/.github/workflows/get_version.yml b/.github/workflows/get_version.yml deleted file mode 100644 index 804739db..00000000 --- a/.github/workflows/get_version.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: get-version -on: [push, workflow_dispatch] - -steps: - - id: get_version - uses: battila7/get-version-action@v2 - - - run: echo ${{ steps.get_version.outputs.version }} - - - run: echo ${{ steps.get_version.outputs.version-without-v }} -- cgit v1.3.1 From d816fab0289796540e5b4c9621b58424f51a01d2 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 12:08:58 +0200 Subject: add badges --- .github/workflows/docker-image.yml | 2 +- README.md | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d23e1ef1..fc0ca7f0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -27,4 +27,4 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: seccerts/sec-certs:tagname + tags: seccerts/sec-certs:latest diff --git a/README.md b/README.md index 35078d09..144d7bb6 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,14 @@ Tool for analysis of security certificates and their security targets (Common Cr This project is developed by the [Centre for Research On Cryptography and Security](https://crocs.fi.muni.cz) at Faculty of Informatics, Masaryk University. -[![Website seccerts.org](https://img.shields.io/website-up-down-green-red/http/monip.org.svg)](http://seccerts.org/) -[![PyPI version sec-certs](https://badge.fury.io/py/ansicolortags.svg)](https://pypi.org/project/sec-certs/) -[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ansicolortags.svg)](https://pypi.python.org/pypi/sec-certs/) -![GitHub actions tests](https://github.com/crocs-muni/sec-certs/actions/workflows/GA_CI.yml/badge.svg) +![Website](https://img.shields.io/website?down_color=red&down_message=offline&style=flat-square&up_color=SpringGreen&up_message=online&url=https%3A%2F%2Fseccerts.org) + +![PyPI](https://img.shields.io/pypi/v/sec-certs?style=flat-square) + +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sec-certs?label=Python%20versions&style=flat-square) + +![GitHub Workflow Status](https://img.shields.io/github/workflow/status/crocs-muni/sec-certs/tests?style=flat-square) + ## Installation (CC) -- cgit v1.3.1 From cb02c5a6b48cd9b71a0f5a23925bcb8f6b036d66 Mon Sep 17 00:00:00 2001 From: Adam Janovsky Date: Sat, 24 Apr 2021 12:44:51 +0200 Subject: add badges, workflow dispatch on publish --- .github/workflows/python-publish.yml | 40 ++++++++++++++++++------------------ README.md | 24 +++++++++++++++------- 2 files changed, 37 insertions(+), 27 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 22f85fe2..2fab292d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,31 +3,31 @@ name: Upload Python Package -on: +on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] + workflow_dispatch: jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} #Same as Docker, need to add an account in the secrets - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} #Same as Docker, need to add an account in the secrets + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/README.md b/README.md index 144d7bb6..340f1329 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,29 @@ Tool for analysis of security certificates and their security targets (Common Cr This project is developed by the [Centre for Research On Cryptography and Security](https://crocs.fi.muni.cz) at Faculty of Informatics, Masaryk University. -![Website](https://img.shields.io/website?down_color=red&down_message=offline&style=flat-square&up_color=SpringGreen&up_message=online&url=https%3A%2F%2Fseccerts.org) +[![Website](https://img.shields.io/website?down_color=red&down_message=offline&style=flat-square&up_color=SpringGreen&up_message=online&url=https%3A%2F%2Fseccerts.org)](https://seccerts.org) +[![PyPI](https://img.shields.io/pypi/v/sec-certs?style=flat-square)](https://pypi.org/project/sec-certs/) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sec-certs?label=Python%20versions&style=flat-square)](https://pypi.org/project/sec-certs/) +[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/crocs-muni/sec-certs/tests?style=flat-square)](https://github.com/crocs-muni/sec-certs/actions/workflows/GA_CI.yml) +[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/crocs-muni/sec-certs/Docker%20Image%20CI?label=Docker%20build&style=flat-square)](https://hub.docker.com/repository/docker/seccerts/sec-certs) -![PyPI](https://img.shields.io/pypi/v/sec-certs?style=flat-square) +## Installation (CC) -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sec-certs?label=Python%20versions&style=flat-square) +The tool requires several Python packages as well as the `pdftotext` binary somewhere on the `PATH`. +[ +The stable release is published on [PyPi](https://pypi.org/project/sec-certs/) as well as on [DockerHub](https://hub.docker.com/repository/docker/seccerts/sec-certs), you can install it with: -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/crocs-muni/sec-certs/tests?style=flat-square) +``` +pip install -U sec-certs +``` +or -## Installation (CC) +``` +docker pull seccerts/sec-certs +``` -The tool requires several Python packages as well as the `pdftotext` binary somewhere on the `PATH`. -The easiest way to setup the tool is to install it in a virtual environment, e.g.: +Alternatively, you can setup the tool for development in a virtual environment, e.g.: Install Python virtual environment (if not yet): ``` python3 -m pip install --upgrade pip -- cgit v1.3.1 From 0605835a24e49840a7b475116ecd6f0390212695 Mon Sep 17 00:00:00 2001 From: Léo Vansimay Date: Thu, 29 Apr 2021 11:10:49 +0200 Subject: Update python-publish.yml The method currently used only works when we tag a version number, I'm trying to use testpypi to avoid a failed build on each try. Moreover the build and push to PyPI will only trigger on a push with a tag--- .github/workflows/python-publish.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2fab292d..782ec7aa 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -24,10 +24,20 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish + + - name: Build and publish to PyPI + if: startsWith(github.ref, 'refs/tags') env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} #Same as Docker, need to add an account in the secrets TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist bdist_wheel twine upload dist/* + + - name: Build and publish to PyPI + env: + TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} #Same as Docker, need to add an account in the secrets + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload --repository testpypi dist/* -- cgit v1.3.1