Skip to content

Commit

Permalink
Update Workflows and add Black (#12)
Browse files Browse the repository at this point in the history
- Added Black to workflows
- Added Black to pyproject.toml
- Updated workflow to build Docker images to use cache and update Docker
Hub repo description
  • Loading branch information
SadParad1se authored Apr 18, 2024
1 parent c67fbf4 commit c12701a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/msf-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
sadparad1se/metasploit-framework:${{ steps.metasploit_setup.outputs.latest_minor_tag }}
sadparad1se/metasploit-framework:${{ steps.metasploit_setup.outputs.latest_major_tag }}
sadparad1se/metasploit-framework:latest
cache-from: type=registry,ref=sadparad1se/metasploit-framework:latest
labels: |
msf-version=${{ steps.metasploit_setup.outputs.latest_tag }}
snek-sploit-commit=$GITHUB_SHA
Expand All @@ -71,6 +72,15 @@ jobs:
sadparad1se/metasploit-framework:rpc-${{ steps.metasploit_setup.outputs.latest_minor_tag }}
sadparad1se/metasploit-framework:rpc-${{ steps.metasploit_setup.outputs.latest_major_tag }}
sadparad1se/metasploit-framework:rpc
cache-from: type=registry,ref=sadparad1se/metasploit-framework:rpc
labels: |
msf-version=${{ steps.metasploit_setup.outputs.latest_tag }}
snek-sploit-commit=$GITHUB_SHA
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: sadparad1se/metasploit-framework
readme-filepath: ./docker/README.md
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tests
on:
push
jobs:
validate_application_code:
name: Validate application code
runs-on: ubuntu-latest
steps:
- name: Check out the current repo
uses: actions/checkout@v4

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install snek-sploit
run: poetry install

- name: Run Black
run: poetry run black --check --diff snek_sploit/
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "snek-sploit"
version = "0.4.0"
version = "0.5.0"
description = "Python RPC client for Metasploit Framework"
authors = [
"Jiří Rája <[email protected]>"
Expand All @@ -18,12 +18,15 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.8"
requests = "^2.31"
msgpack = "^1"
requests = "^2.31.0"
msgpack = "^1.0.8"

[tool.poetry.group.dev.dependencies]
black = "^24"

[tool.black]
line-length = 120

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit c12701a

Please sign in to comment.