saltext.openscap 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. saltext_openscap-0.1.0/.codecov.yml +25 -0
  2. saltext_openscap-0.1.0/.copier-answers.yml +29 -0
  3. saltext_openscap-0.1.0/.coveragerc +44 -0
  4. saltext_openscap-0.1.0/.envrc.example +7 -0
  5. saltext_openscap-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +48 -0
  6. saltext_openscap-0.1.0/.github/ISSUE_TEMPLATE/config.yml +14 -0
  7. saltext_openscap-0.1.0/.github/ISSUE_TEMPLATE/docs.md +23 -0
  8. saltext_openscap-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  9. saltext_openscap-0.1.0/.github/ISSUE_TEMPLATE/tech-debt.md +13 -0
  10. saltext_openscap-0.1.0/.github/ISSUE_TEMPLATE.md +11 -0
  11. saltext_openscap-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +24 -0
  12. saltext_openscap-0.1.0/.github/workflows/ci.yml +175 -0
  13. saltext_openscap-0.1.0/.github/workflows/deploy-docs-action.yml +78 -0
  14. saltext_openscap-0.1.0/.github/workflows/deploy-package-action.yml +60 -0
  15. saltext_openscap-0.1.0/.github/workflows/docs-action.yml +58 -0
  16. saltext_openscap-0.1.0/.github/workflows/get-changed-files.yml +52 -0
  17. saltext_openscap-0.1.0/.github/workflows/package-action.yml +64 -0
  18. saltext_openscap-0.1.0/.github/workflows/pr.yml +56 -0
  19. saltext_openscap-0.1.0/.github/workflows/pre-commit-action.yml +56 -0
  20. saltext_openscap-0.1.0/.github/workflows/prepare-release-action.yml +65 -0
  21. saltext_openscap-0.1.0/.github/workflows/tag.yml +128 -0
  22. saltext_openscap-0.1.0/.github/workflows/test-action.yml +99 -0
  23. saltext_openscap-0.1.0/.gitignore +136 -0
  24. saltext_openscap-0.1.0/.pre-commit-config.yaml +146 -0
  25. saltext_openscap-0.1.0/.pre-commit-hooks/check-cli-examples.py +64 -0
  26. saltext_openscap-0.1.0/.pre-commit-hooks/make-autodocs.py +123 -0
  27. saltext_openscap-0.1.0/.pylintrc +692 -0
  28. saltext_openscap-0.1.0/CHANGELOG.md +9 -0
  29. saltext_openscap-0.1.0/CODE-OF-CONDUCT.md +127 -0
  30. saltext_openscap-0.1.0/CONTRIBUTING.md +14 -0
  31. saltext_openscap-0.1.0/LICENSE +201 -0
  32. saltext_openscap-0.1.0/Makefile +58 -0
  33. saltext_openscap-0.1.0/NOTICE +10 -0
  34. saltext_openscap-0.1.0/PKG-INFO +158 -0
  35. saltext_openscap-0.1.0/README.md +106 -0
  36. saltext_openscap-0.1.0/changelog/.template.jinja +15 -0
  37. saltext_openscap-0.1.0/docs/Makefile +20 -0
  38. saltext_openscap-0.1.0/docs/_ext/saltdomain.py +18 -0
  39. saltext_openscap-0.1.0/docs/_static/.gitkeep +0 -0
  40. saltext_openscap-0.1.0/docs/changelog.md +12 -0
  41. saltext_openscap-0.1.0/docs/conf.py +194 -0
  42. saltext_openscap-0.1.0/docs/index.rst +33 -0
  43. saltext_openscap-0.1.0/docs/make.bat +35 -0
  44. saltext_openscap-0.1.0/docs/ref/.gitkeep +0 -0
  45. saltext_openscap-0.1.0/docs/ref/modules/index.rst +12 -0
  46. saltext_openscap-0.1.0/docs/ref/modules/saltext.openscap.modules.openscap.rst +5 -0
  47. saltext_openscap-0.1.0/docs/sitevars.rst +0 -0
  48. saltext_openscap-0.1.0/docs/topics/installation.md +28 -0
  49. saltext_openscap-0.1.0/noxfile.py +530 -0
  50. saltext_openscap-0.1.0/pyproject.toml +193 -0
  51. saltext_openscap-0.1.0/setup.cfg +4 -0
  52. saltext_openscap-0.1.0/setup.py +5 -0
  53. saltext_openscap-0.1.0/src/saltext/openscap/__init__.py +28 -0
  54. saltext_openscap-0.1.0/src/saltext/openscap/modules/__init__.py +0 -0
  55. saltext_openscap-0.1.0/src/saltext/openscap/modules/openscap.py +89 -0
  56. saltext_openscap-0.1.0/src/saltext/openscap/version.py +1 -0
  57. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/PKG-INFO +158 -0
  58. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/SOURCES.txt +82 -0
  59. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/dependency_links.txt +1 -0
  60. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/entry_points.txt +2 -0
  61. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/not-zip-safe +1 -0
  62. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/requires.txt +35 -0
  63. saltext_openscap-0.1.0/src/saltext.openscap.egg-info/top_level.txt +1 -0
  64. saltext_openscap-0.1.0/tests/__init__.py +0 -0
  65. saltext_openscap-0.1.0/tests/conftest.py +173 -0
  66. saltext_openscap-0.1.0/tests/functional/__init__.py +0 -0
  67. saltext_openscap-0.1.0/tests/functional/conftest.py +150 -0
  68. saltext_openscap-0.1.0/tests/functional/modules/__init__.py +0 -0
  69. saltext_openscap-0.1.0/tests/integration/__init__.py +0 -0
  70. saltext_openscap-0.1.0/tests/integration/conftest.py +40 -0
  71. saltext_openscap-0.1.0/tests/integration/modules/__init__.py +0 -0
  72. saltext_openscap-0.1.0/tests/unit/__init__.py +0 -0
  73. saltext_openscap-0.1.0/tests/unit/conftest.py +62 -0
  74. saltext_openscap-0.1.0/tests/unit/modules/__init__.py +0 -0
  75. saltext_openscap-0.1.0/tests/unit/modules/test_openscap.py +212 -0
  76. saltext_openscap-0.1.0/tools/helpers/__init__.py +0 -0
  77. saltext_openscap-0.1.0/tools/helpers/cmd.py +290 -0
  78. saltext_openscap-0.1.0/tools/helpers/copier.py +114 -0
  79. saltext_openscap-0.1.0/tools/helpers/git.py +30 -0
  80. saltext_openscap-0.1.0/tools/helpers/pre_commit.py +115 -0
  81. saltext_openscap-0.1.0/tools/helpers/prompt.py +54 -0
  82. saltext_openscap-0.1.0/tools/helpers/venv.py +108 -0
  83. saltext_openscap-0.1.0/tools/initialize.py +26 -0
  84. saltext_openscap-0.1.0/tools/version.py +92 -0
@@ -0,0 +1,25 @@
1
+ ---
2
+ coverage:
3
+ status:
4
+ project:
5
+ default: false
6
+ app:
7
+ informational: true
8
+ paths:
9
+ - src/
10
+ tests:
11
+ informational: true
12
+ paths:
13
+ - tests/
14
+ patch:
15
+ default: false
16
+ app:
17
+ informational: true
18
+ paths:
19
+ - src/
20
+ tests:
21
+ informational: true
22
+ paths:
23
+ - tests/
24
+ github_checks:
25
+ annotations: false
@@ -0,0 +1,29 @@
1
+ # Autogenerated. Do not edit this by hand, use `copier update`.
2
+ ---
3
+ _commit: 0.8.0
4
+ _src_path: https://github.com/salt-extensions/salt-extension-copier
5
+ author: Marek Czernek
6
+ author_email: marek.czernek@suse.com
7
+ coc_contact: ''
8
+ copyright_begin: 2025
9
+ deploy_docs: never
10
+ docs_url: ''
11
+ integration_name: Openscap
12
+ license: apache
13
+ loaders:
14
+ - module
15
+ max_salt_version: '3007'
16
+ no_saltext_namespace: false
17
+ os_support:
18
+ - Linux
19
+ package_name: openscap
20
+ project_name: openscap
21
+ python_requires: '3.10'
22
+ relax_pylint: true
23
+ salt_version: '3006'
24
+ source_url: https://github.com/m-czernek/saltext-openscap
25
+ ssh_fixtures: true
26
+ summary: Salt Extension for interacting with Openscap
27
+ test_containers: false
28
+ tracker_url: https://bugzilla.opensuse.org
29
+ url: https://github.com/m-czernek/saltext-openscap
@@ -0,0 +1,44 @@
1
+ [run]
2
+ branch = True
3
+ cover_pylib = False
4
+ relative_files = True
5
+ parallel = True
6
+ concurrency = multiprocessing
7
+
8
+ omit =
9
+ .nox/*
10
+ setup.py
11
+
12
+ [report]
13
+ # Regexes for lines to exclude from consideration
14
+ exclude_also =
15
+ # Don't complain about missing debug-only code:
16
+ def __repr__
17
+
18
+ # Don't complain if tests don't hit defensive assertion code:
19
+ raise AssertionError
20
+ raise NotImplementedError
21
+
22
+ # Don't complain if non-runnable code isn't run:
23
+ if 0:
24
+ if False:
25
+ if __name__ == .__main__.:
26
+ if TYPE_CHECKING:
27
+ @(abc\.)?abstractmethod
28
+
29
+ # Add markers which exclude statements in between.
30
+ # Requires coverage>=7.6.0.
31
+ no cover: start(?s:.)*?no cover: stop
32
+
33
+ omit =
34
+ .nox/*
35
+ setup.py
36
+
37
+ ignore_errors = True
38
+
39
+ [paths]
40
+ source =
41
+ saltext/openscap
42
+ src/saltext/openscap
43
+ testsuite =
44
+ tests/
@@ -0,0 +1,7 @@
1
+ layout_saltext() {
2
+ VIRTUAL_ENV="$(python3 tools/initialize.py --print-venv)"
3
+ PATH_add "$VIRTUAL_ENV/bin"
4
+ export VIRTUAL_ENV
5
+ }
6
+
7
+ layout_saltext
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG]"
5
+ labels: bug, needs-triage
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Description**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **Setup**
14
+ (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
15
+
16
+ Please be as specific as possible and give set-up details.
17
+
18
+ - [ ] on-prem machine
19
+ - [ ] VM (Virtualbox, KVM, etc. please specify)
20
+ - [ ] VM running on a cloud service, please be explicit and add details
21
+ - [ ] container (Kubernetes, Docker, containerd, etc. please specify)
22
+ - [ ] or a combination, please be explicit
23
+ - [ ] jails if it is FreeBSD
24
+ - [ ] classic packaging
25
+ - [ ] onedir packaging
26
+ - [ ] used bootstrap to install
27
+
28
+
29
+ **Steps to Reproduce the behavior**
30
+ (Include debug logs if possible and relevant)
31
+
32
+ **Expected behavior**
33
+ A clear and concise description of what you expected to happen.
34
+
35
+ **Screenshots**
36
+ If applicable, add screenshots to help explain your problem.
37
+
38
+ **Versions Report**
39
+ <details><summary>salt --versions-report</summary>
40
+ (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
41
+
42
+ ```yaml
43
+ PASTE HERE
44
+ ```
45
+ </details>
46
+
47
+ **Additional context**
48
+ Add any other context about the problem here.
@@ -0,0 +1,14 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Salt Community Slack
4
+ url: https://saltstackcommunity.slack.com/
5
+ about: Please ask and answer questions here.
6
+ - name: Salt-Users Forum
7
+ url: https://groups.google.com/forum/#!forum/salt-users
8
+ about: Please ask and answer questions here.
9
+ - name: Salt on LiberaChat
10
+ url: https://web.libera.chat/#salt
11
+ about: Please ask and answer questions here.
12
+ - name: Security vulnerabilities
13
+ email: saltproject-security.pdl@broadcom.com
14
+ about: Please report security vulnerabilities here.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Docs
3
+ about: Issue related to Salt Documentation
4
+ title: "[DOCS]"
5
+ labels: documentation, needs-triage
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Description**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Suggested Fix**
14
+ What did you expect to see in the documentation that is missing or needs updating?
15
+
16
+ **Type of documentation**
17
+ This could be module documentation or a guide.
18
+
19
+ **Location or format of documentation**
20
+ Insert page URL if applicable.
21
+
22
+ **Additional context**
23
+ Add any other context or screenshots here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: "[FEATURE REQUEST]"
5
+ labels: feature, needs-triage
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: Tech Debt
3
+ about: Issue is related to tech debt. This includes compatibility changes for newer versions of software and OSes that salt interacts with.
4
+ title: "[TECH DEBT]"
5
+ labels: tech-debt
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ### Description of the tech debt to be addressed, include links and screenshots
11
+
12
+ ### Versions Report
13
+ (Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)
@@ -0,0 +1,11 @@
1
+ ### Description of Issue
2
+ <!-- Note: Please direct questions to the salt-users google group, Slack, IRC, etc. Only post issues and feature requests here -->
3
+
4
+ ### Setup
5
+ (Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
6
+
7
+ ### Steps to Reproduce Issue
8
+ (Include debug logs if possible and relevant.)
9
+
10
+ ### Versions Report
11
+ (Provided by running `salt --versions-report`. Please also mention any differences in master/minion versions.)
@@ -0,0 +1,24 @@
1
+ ### What does this PR do?
2
+
3
+ ### What issues does this PR fix or reference?
4
+ Fixes:
5
+
6
+ ### Previous Behavior
7
+ Remove this section if not relevant
8
+
9
+ ### New Behavior
10
+ Remove this section if not relevant
11
+
12
+ ### Merge requirements satisfied?
13
+ **[NOTICE] Bug fixes or new features require tests.**
14
+ <!-- Please review the [salt-extensions](https://salt-extensions.github.io/salt-extension-copier/topics/testing/writing.html) and [Salt test documentation](https://docs.saltproject.io/en/master/topics/tutorials/writing_tests.html) for details on how to implement tests for your changes. -->
15
+ - [ ] Docs
16
+ - [ ] Changelog - https://salt-extensions.github.io/salt-extension-copier/topics/documenting/changelog.html#procedure
17
+ - [ ] Tests written/updated
18
+
19
+ ### Commits signed with GPG?
20
+ Yes/No
21
+
22
+ Please review [Salt's Contributing Guide](https://docs.saltproject.io/en/master/topics/development/contributing.html) for best practices.
23
+
24
+ See GitHub's [page on GPG signing](https://help.github.com/articles/signing-commits-using-gpg/) for more information about signing commits with GPG.
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: CI
3
+
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ deploy-docs:
8
+ required: false
9
+ type: boolean
10
+ default: false
11
+ release:
12
+ required: false
13
+ type: boolean
14
+ default: false
15
+ version:
16
+ required: false
17
+ type: string
18
+ secrets:
19
+ PYPI_API_TOKEN:
20
+ required: false
21
+ TEST_PYPI_API_TOKEN:
22
+ required: false
23
+
24
+
25
+ jobs:
26
+ get-changed-files:
27
+ name: Get Changed Files
28
+ uses: ./.github/workflows/get-changed-files.yml
29
+
30
+ pre-commit:
31
+ name: Pre-Commit
32
+ uses: ./.github/workflows/pre-commit-action.yml
33
+ needs:
34
+ - get-changed-files
35
+ with:
36
+ changed-files: ${{ needs.get-changed-files.outputs.changed-files }}
37
+
38
+ test:
39
+ name: Test
40
+ needs:
41
+ - pre-commit
42
+ uses: ./.github/workflows/test-action.yml
43
+
44
+ docs:
45
+ name: Docs
46
+ needs:
47
+ - pre-commit
48
+ uses: ./.github/workflows/docs-action.yml
49
+
50
+ check-prepare-release:
51
+ name: Check if we can prepare release PR
52
+ if: >-
53
+ github.event_name == 'push' &&
54
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
55
+ needs:
56
+ - docs
57
+ - test
58
+ runs-on: ubuntu-24.04
59
+ outputs:
60
+ news-fragments-available: ${{ steps.check-available.outputs.available }}
61
+
62
+ steps:
63
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
64
+
65
+ - name: Check if news fragments are available
66
+ id: check-available
67
+ run: |
68
+ if [ -n "$(find changelog -type f -not -name '.*' -print -quit)" ]; then
69
+ echo "available=1" >> "$GITHUB_OUTPUT"
70
+ else
71
+ echo "available=0" >> "$GITHUB_OUTPUT"
72
+ fi
73
+
74
+ prepare-release:
75
+ name: Prepare Release PR
76
+ if: ${{ needs.check-prepare-release.outputs.news-fragments-available == '1' }}
77
+ needs:
78
+ - check-prepare-release
79
+ - docs
80
+ - test
81
+ permissions:
82
+ contents: write
83
+ pull-requests: write
84
+ uses: ./.github/workflows/prepare-release-action.yml
85
+
86
+ deploy-docs:
87
+ name: Deploy Docs
88
+ uses: ./.github/workflows/deploy-docs-action.yml
89
+ # Only build doc deployments from the default branch of the repo and never for PRs,
90
+ # unless the triggering event was the release PR being merged.
91
+ if: >-
92
+ inputs.deploy-docs &&
93
+ (
94
+ github.event_name != 'pull_request' ||
95
+ inputs.release
96
+ ) &&
97
+ github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
98
+ needs:
99
+ - docs
100
+ - test
101
+
102
+ build-python-package:
103
+ name: Python Package
104
+ if: ${{ inputs.release && success() }}
105
+ uses: ./.github/workflows/package-action.yml
106
+ needs:
107
+ - pre-commit
108
+ with:
109
+ version: "${{ inputs.version }}"
110
+
111
+ deploy-python-package-test-pypi:
112
+ name: Deploy Python Package (Test PyPI)
113
+ uses: ./.github/workflows/deploy-package-action.yml
114
+ if: ${{ inputs.release && success() }}
115
+ needs:
116
+ - test
117
+ - docs
118
+ - build-python-package
119
+ secrets:
120
+ TEST_PYPI_API_TOKEN: "${{ secrets.TEST_PYPI_API_TOKEN }}"
121
+ with:
122
+ version: "${{ inputs.version }}"
123
+
124
+ deploy-python-package:
125
+ name: Deploy Python Package (PyPI)
126
+ uses: ./.github/workflows/deploy-package-action.yml
127
+ if: ${{ inputs.release && success() }}
128
+ needs:
129
+ - deploy-python-package-test-pypi
130
+ secrets:
131
+ PYPI_API_TOKEN: "${{ secrets.PYPI_API_TOKEN }}"
132
+ with:
133
+ test: false
134
+ version: "${{ inputs.version }}"
135
+
136
+ set-pipeline-exit-status:
137
+ # This step is just so we can make github require this step, to pass checks
138
+ # on a pull request instead of requiring all
139
+ name: Set the CI Pipeline Exit Status
140
+ runs-on: ubuntu-24.04
141
+ if: always()
142
+ needs:
143
+ - test
144
+ - docs
145
+ - deploy-docs
146
+ - build-python-package
147
+ - deploy-python-package-test-pypi
148
+ - deploy-python-package
149
+
150
+ steps:
151
+ - name: Download Exit Status Files
152
+ if: always()
153
+ uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
154
+ with:
155
+ path: exitstatus
156
+ pattern: exitstatus-*
157
+ merge-multiple: true
158
+
159
+ - name: Delete Exit Status Artifacts
160
+ if: always()
161
+ uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0
162
+ with:
163
+ name: exitstatus-*
164
+ useGlob: true
165
+ failOnError: false
166
+
167
+ - name: Set Pipeline Exit Status
168
+ run: |
169
+ tree exitstatus
170
+ grep -RE 'failure|cancelled' exitstatus/ && exit 1 || exit 0
171
+
172
+ - name: Done
173
+ if: always()
174
+ run:
175
+ echo "All workflows finished"
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: Publish Documentation
3
+
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ # This is the name of the regular artifact that should
8
+ # be transformed into a GitHub Pages deployment.
9
+ artifact-name:
10
+ type: string
11
+ required: false
12
+ default: html-docs
13
+
14
+ jobs:
15
+
16
+ # The released docs are not versioned currently, only the latest ones are deployed.
17
+ #
18
+ # Versioning support would require either (better):
19
+ # * Rebuilding docs for all versions when a new release is made
20
+ # * Version selector support in `furo`: https://github.com/pradyunsg/furo/pull/500
21
+ #
22
+ # or (more basic):
23
+ # * using the `gh-pages` branch and peaceiris/actions-gh-pages
24
+ # to be able to deploy to subdirectories. The implementation via
25
+ # actions/deploy-pages always replaces the directory root.
26
+
27
+ Deploy-Docs-GH-Pages:
28
+ name: Publish Docs to GitHub Pages
29
+
30
+ environment:
31
+ name: github-pages
32
+ url: ${{ steps.deployment.outputs.page_url }}
33
+
34
+ permissions:
35
+ pages: write
36
+ id-token: write
37
+
38
+ runs-on: ubuntu-24.04
39
+
40
+ steps:
41
+ - name: Download built docs
42
+ uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
43
+ with:
44
+ name: ${{ inputs.artifact-name }}
45
+ path: html-docs
46
+
47
+ - name: Upload GitHub Pages artifact
48
+ uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
49
+ with:
50
+ name: html-docs-pages
51
+ path: html-docs
52
+
53
+ - name: Deploy to GitHub Pages
54
+ id: deployment
55
+ uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
56
+ with:
57
+ artifact_name: html-docs-pages
58
+
59
+ - name: Delete GitHub Pages artifact
60
+ if: always()
61
+ uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0
62
+ with:
63
+ name: html-docs-pages
64
+ failOnError: false
65
+
66
+ - name: Set Exit Status
67
+ if: always()
68
+ run: |
69
+ mkdir exitstatus
70
+ echo "${{ job.status }}" > exitstatus/${{ github.job }}
71
+
72
+ - name: Upload Exit Status
73
+ if: always()
74
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
75
+ with:
76
+ name: exitstatus-${{ github.job }}
77
+ path: exitstatus
78
+ if-no-files-found: error
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: Deploy Salt Extension Python Package
3
+
4
+ on:
5
+ workflow_call:
6
+ inputs:
7
+ test:
8
+ type: boolean
9
+ required: false
10
+ default: true
11
+ version:
12
+ type: string
13
+ required: true
14
+ secrets:
15
+ PYPI_API_TOKEN:
16
+ required: false
17
+ TEST_PYPI_API_TOKEN:
18
+ required: false
19
+
20
+ jobs:
21
+ build:
22
+ name: Publish Python Package to ${{ ! inputs.test && 'PyPI' || 'Test PyPI' }}
23
+ runs-on: ubuntu-24.04
24
+
25
+ steps:
26
+ - name: Download Python Package Artifacts
27
+ uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
28
+ with:
29
+ name: salt-extension-${{ inputs.version }}-packages
30
+ path: dist
31
+
32
+ - name: Publish distribution to Test PyPI
33
+ uses: pypa/gh-action-pypi-publish@1bb664cc2ddedbbfdde43d4ac135d5836b7bf40f # v1.11.0
34
+ if: ${{ inputs.test }}
35
+ with:
36
+ attestations: false
37
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
38
+ repository-url: https://test.pypi.org/legacy/
39
+
40
+ - name: Create GitHub Release
41
+ if: ${{ !inputs.test }}
42
+ env:
43
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44
+ run: |
45
+ gh release create "v${{ inputs.version }}" \
46
+ --repo="$GITHUB_REPOSITORY" \
47
+ --title="${GITHUB_REPOSITORY#*/} ${{ inputs.version }}" \
48
+ --generate-notes \
49
+ dist/*
50
+
51
+ - name: Publish distribution to PyPI
52
+ uses: pypa/gh-action-pypi-publish@1bb664cc2ddedbbfdde43d4ac135d5836b7bf40f # v1.11.0
53
+ if: ${{ !inputs.test }}
54
+ with:
55
+ # Attestations are only submitted when using Trusted Publishing,
56
+ # which is triggered by secrets.PYPI_API_TOKEN not being set.
57
+ # They don't work with reusable workflows at the moment.
58
+ # It's related to https://github.com/pypi/warehouse/issues/11096
59
+ attestations: false
60
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: Build Documentation
3
+
4
+ on:
5
+ workflow_call:
6
+
7
+ jobs:
8
+ Docs:
9
+ runs-on: ubuntu-24.04
10
+ timeout-minutes: 10
11
+
12
+ steps:
13
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - name: Set up Python 3.10 For Nox
18
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
19
+ with:
20
+ python-version: "3.10"
21
+
22
+ - name: Install Nox
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install "nox==$NOX_VERSION" "uv==$UV_VERSION"
26
+ env:
27
+ NOX_VERSION: '2025.11.12'
28
+ UV_VERSION: '0.9.27'
29
+
30
+ - name: Install Doc Requirements
31
+ run: |
32
+ nox --force-color -e docs --install-only
33
+
34
+ - name: Build Docs
35
+ env:
36
+ SKIP_REQUIREMENTS_INSTALL: true
37
+ run: |
38
+ nox --force-color -e docs
39
+
40
+ - name: Upload built docs as artifact
41
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
42
+ with:
43
+ name: html-docs
44
+ path: docs/_build/html
45
+
46
+ - name: Set Exit Status
47
+ if: always()
48
+ run: |
49
+ mkdir exitstatus
50
+ echo "${{ job.status }}" > exitstatus/${{ github.job }}
51
+
52
+ - name: Upload Exit Status
53
+ if: always()
54
+ uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
55
+ with:
56
+ name: exitstatus-${{ github.job }}
57
+ path: exitstatus
58
+ if-no-files-found: error
@@ -0,0 +1,52 @@
1
+ ---
2
+ on:
3
+ workflow_call:
4
+ outputs:
5
+ changed-files:
6
+ description: "Changed file JSON output from dorny/paths-filter"
7
+ value: ${{ jobs.get-changed-files.outputs.changed-files }}
8
+
9
+ jobs:
10
+ get-changed-files:
11
+ name: Get Changed Files
12
+ runs-on: ubuntu-24.04
13
+ permissions:
14
+ contents: read # for dorny/paths-filter to fetch a list of changed files
15
+ pull-requests: read # for dorny/paths-filter to read pull requests
16
+ outputs:
17
+ changed-files: ${{ toJSON(steps.changed-files.outputs) }}
18
+
19
+ steps:
20
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21
+
22
+ - name: Get Changed Files
23
+ id: changed-files
24
+ uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
25
+ with:
26
+ token: ${{ github.token }}
27
+ list-files: escape
28
+ filters: |
29
+ repo:
30
+ - added|modified:
31
+ - '**'
32
+ deleted:
33
+ - deleted:
34
+ - '**'
35
+ pre-commit:
36
+ - added|modified|deleted:
37
+ - .pre-commit-hooks/**
38
+ - .pre-commit-config.y?(a)ml
39
+ - .pylintrc
40
+ - pyproject.toml
41
+ # If files in this filter change, a test release to TestPyPI
42
+ # should be attempted. This is currently not implemented yet.
43
+ release:
44
+ - added|modified|deleted:
45
+ - .copier-answers.y?(a)ml
46
+ - .github/workflows/**
47
+ - CHANGELOG.md
48
+ - pyproject.toml
49
+ - setup.py
50
+
51
+ - name: Echo Changed Files Output
52
+ run: echo "${{ toJSON(steps.changed-files.outputs) }}"