deptrac-action
What does this action do?
This action runs qossmic/deptrac
.
You define via args
which command runs and which depfile is used.
That is, when you enable this action, the action will fail when finds violations between layers.
Usage
Define a workflow in .github/workflows/ci.yml
(or add a job if you already have defined workflows).
💡 Read more about Configuring a workflow.
There are two ways of using this action:
- using the pre-built Docker image (faster)
- letting GitHub build the Docker image for you (slower)
Pre-built Docker image
on: [push, pull_request]
name: Test
jobs:
deptrac:
name: deptrac
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: deptrac
uses: docker://smoench/deptrac-action:latest
with:
args: analyse depfile.yaml
You can also execute the image directly by running
docker run --interactive --rm --tty --workdir=/app --volume ${PWD}:/app smoench/deptrac-action:latest analyse depfile.
💡 Also see Docker Docs: Docker run reference.
GitHub Repository
If you prefer to have GitHub to build the image for you, you can specify the repository instead:
name: CI
on: push
jobs:
deptrac:
name: deptrac
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: deptrac
uses: smoench/deptrac-action@master
License
This package is licensed using the MIT License.
Credits
The implementation of this GitHub action is largely inspired by the work of Andreas Möller
on the GitHub actions localheinz/composer-normalize-action
.