Skip to content

Commit

Permalink
Add GitHub workflows (#15)
Browse files Browse the repository at this point in the history
* Add GitHub workflows and related files

Signed-off-by: NilashishC <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: NilashishC <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
NilashishC and pre-commit-ci[bot] authored Oct 17, 2023
1 parent 1fd8cc0 commit 3755aa7
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 699 deletions.
2 changes: 2 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ Representer
returndocs
Rocannon's
rtype
rulebook
rulebooks
runtimes
scaffolder
Scaffolder
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @NilashishC
5 changes: 5 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Community Code of Conduct

Please see the official [Ansible Community Code of Conduct][coc].

[coc]: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
labels: bug, new
---

##### ISSUE TYPE

- Bug Report

##### SUMMARY

<!-- Briefly describe the problem. -->

##### ANSIBLE-CREATOR VERSION

<!--- Paste, BELOW THIS COMMENT, verbatim output from "ansible-navigator --version" between quotes below -->

```
```

##### PYTHON VERSION

<!--- Paste output from `python --version` -->

##### LOG FILE

<!--- Paste relevant logs from the ansible-creator
log file preferably after setting the log-level to `debug`,
under the prompt line.
**HINT:** You can paste https://gist.github.com links for larger files..-->

##### STEPS TO REPRODUCE

<!-- Please describe exactly how to reproduce the problem. -->

##### EXPECTED RESULTS

<!-- What did you expect to happen when running the steps above? -->

##### ACTUAL RESULTS

<!-- What actually happened? -->

##### ADDITIONAL INFORMATION

<!-- Include any links screenshots or other
additional information -->
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "📝 Documentation Report"
about: Ask us about docs
labels: documentation, new
---

##### ISSUE TYPE

- Doc issue

##### SUMMARY

<!-- Explain the problem briefly below, add suggestions to wording or structure. -->
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: "✨ Feature request"
about: Suggest an idea for this project
labels: enhancement, new
---

##### ISSUE TYPE

- Feature Idea

##### SUMMARY

<!-- Briefly describe the problem or desired enhancement. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/security_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "\U0001F525 Security bug report"
about: How to report security vulnerabilities
labels: new
---

For all security related bugs, email [email protected] instead of using this
issue tracker and you will receive a prompt response.

For more information on the Ansible community's practices regarding responsible
disclosure, see https://www.ansible.com/security
14 changes: 4 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
version: 2
updates:
- package-ecosystem: pip
directory: /.config/
directory: /
schedule:
day: sunday
interval: weekly
versioning-strategy: increase
labels:
- dependabot-deps-updates
- skip-changelog
versioning-strategy: lockfile-only
ignore:
- dependency-name: mypy
- dependency-name: pipdeptree
- dependency-name: pylint
- dependency-name: types-jsonschema
- dependency-name: types-pyyaml
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
labels:
Expand Down
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# see https://github.com/ansible-community/devtools
_extends: ansible-community/devtools
9 changes: 9 additions & 0 deletions .github/workflows/ack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/ack.yml
name: ack
on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
ack:
uses: ansible/devtools/.github/workflows/ack.yml@main
9 changes: 9 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/push.yml
name: Run release drafter
on:
workflow_dispatch:

jobs:
run_release_drafter:
uses: ansible/devtools/.github/workflows/push.yml@main
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: release

on:
release:
types: [published]

jobs:
publish-to-testpypi:
name: Publish ansible-creator 🛠️ package 📦 to TestPyPI
if: github.event_name == 'release'
environment: release
runs-on: ubuntu-22.04
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Switch to using Python 3.9 by default
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install build
run: >-
python3 -m
pip install
--user
build
- name: Check out src from Git
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed by setuptools-scm

- name: Build dists
run: python -m build

- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Publish to pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
Expand All @@ -12,7 +12,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/add-trailing-comma.git
rev: v3.0.1
rev: v3.1.0
hooks:
- id: add-trailing-comma
args:
Expand All @@ -25,7 +25,7 @@ repos:

- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before yamllint
rev: v3.0.2
rev: v3.0.3
hooks:
- id: prettier
always_run: true
Expand All @@ -35,7 +35,7 @@ repos:
- prettier-plugin-sort-json

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black

Expand All @@ -50,27 +50,27 @@ repos:
- id: tox-ini-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.286"
rev: "v0.1.0"
hooks:
- id: ruff
args:
- "--exit-non-zero-on-fix"

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v7.0.1
rev: v7.3.2
hooks:
- id: cspell
name: Spell check with cspell

- repo: https://github.com/jsh9/pydoclint
rev: 0.3.1
rev: 0.3.4
hooks:
- id: pydoclint
args:
- "--config=pyproject.toml"

- repo: https://github.com/pycqa/pylint.git
rev: v3.0.0a7
rev: v3.0.1
hooks:
- id: pylint
args:
Expand All @@ -82,7 +82,7 @@ repos:
- black

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: v1.5.1
rev: v1.6.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

Please see the [release notes](https://github.com/ansible-community/ansible-creator/releases).
Loading

0 comments on commit 3755aa7

Please sign in to comment.