-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub action and Docker image for asciidoc-linter #14
base: main
Are you sure you want to change the base?
Conversation
Related to #11 Add GitHub action and Docker image for AsciiDoc Linter. * **Dockerfile** - Create a Dockerfile to build a Docker image for the linter. - Use Python 3.9 as the base image. - Copy the project files into the Docker image. - Install the project dependencies. - Set the entry point to the linter CLI. * **GitHub Action Workflow** - Create a new GitHub action workflow file `.github/workflows/asciidoc-linter-action.yml`. - Use the Docker image to run the linter. - Trigger the action on push and pull request events to the main branch. - Define steps to build and run the Docker image. * **README.adoc** - Add instructions on how to use the linter as a GitHub action. - Add instructions on how to use the linter as a Docker image. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/docToolchain/asciidoc-linter/issues/11?shareId=XXXX-XXXX-XXXX-XXXX).
* **Dockerfile** - Use Python 3.9 as the base image - Copy the project files into the Docker image - Install the project dependencies - Set the entry point to the linter CLI * **GitHub Action** - Use the Docker image to run the linter - Trigger the action on pull requests and pushes to the main branch - Define the steps to build and run the Docker image * **README.adoc** - Add instructions on how to use the linter as a GitHub action - Add instructions on how to use the linter as a Docker image
* Install asciidoc-linter as described in the README file
* Change the entry point to `asciidoc-linter` in the Dockerfile
* Add `RUN pip install pyyaml` to Dockerfile to install pyyaml in the Docker image * Add `pip install pyyaml` to setup_test_environment.sh to install pyyaml in the test environment
* **Dockerfile** - Change entry point to `asciidoc-lint` from `asciidoc-linter` * **setup.py** - Add `pyyaml` to the list of dependencies - Change console script entry point to `asciidoc-linter` from `asciidoc-lint`
* Change ENTRYPOINT from "asciidoc-lint" to "asciidoc-linter"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add https://peps.python.org/pep-0518/ (or PEP in general) to the AI to make it follow recommended Python practices.
|
||
# Install the project dependencies | ||
RUN pip install --no-cache-dir -e . | ||
RUN pip install pyyaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime dependencies should be part of pyproject.toml to satisfy arbitrary installations (not only Docker), cf. #15
|
||
[source,bash] | ||
---- | ||
docker build -t asciidoc-linter . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a Docker compose.yml
file which creates a tag for the new image so that it can easily be used by other projects as well.
@@ -13,6 +13,7 @@ | |||
"pytest-metadata", | |||
"black", | |||
"flake8", | |||
"pyyaml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a pyproject.toml and a setup.py which overlap?
Accidentally removed branch ... |
Related to #11
Add GitHub action and Docker image for AsciiDoc Linter.
Dockerfile
GitHub Action Workflow
.github/workflows/asciidoc-linter-action.yml
.README.adoc
For more details, open the Copilot Workspace session.