Skip to content

Commit

Permalink
Merge branch 'main' into cwa/close-122-cli-as-pre-commit-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperWA committed Apr 25, 2024
2 parents 268d6eb + 7b8c796 commit 49b9f0b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/cd_onto-ns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,39 @@ on:
workflows: ["CI - Tests"]
types: [completed]
branches: [main]
workflow_dispatch:

jobs:
deploy:
check-service-changes:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
service-changes: ${{ steps.check-changes.outputs.service-changes }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check changes
id: check-changes
run: |
git fetch --all --quiet
git diff --name-only origin/main -- | \
grep -qE "entities_service/((models/|service/)(.+/)*)?[^/]*\.py" \
&& SERVICE_CHANGES=true \
|| SERVICE_CHANGES=false
echo "Changed files:"
git diff --name-only origin/main --
echo "SERVICE_CHANGES=${SERVICE_CHANGES}"
echo "service-changes=${SERVICE_CHANGES}" >> $GITHUB_OUTPUT
deploy:
runs-on: ubuntu-latest
needs: check-service-changes
if: ${{ needs.check-service-changes.outputs.service-changes == 'true' }}

steps:
- name: Set up Python 3.10
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ coverage.xml
# running
logs/
docker_security/

# build
dist/
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "entities_service"

[tool.flit.sdist]
exclude = [
".*",
"tests",
"docs",
"CHANGELOG.md",
"docker-compose.yml",
"Dockerfile",
]
include = [
"pyproject.toml",
"README.md",
"LICENSE",
"entities_service",
]

[project]
name = "entities-service"
authors = [
Expand Down

0 comments on commit 49b9f0b

Please sign in to comment.