Skip to content

Commit

Permalink
fix(tags): tag option added
Browse files Browse the repository at this point in the history
Added tag option and tested within/examples/**
  • Loading branch information
shamimice03 authored Aug 30, 2023
2 parents 47fe308 + f86d0ba commit 8015539
Show file tree
Hide file tree
Showing 18 changed files with 330 additions and 53 deletions.
128 changes: 128 additions & 0 deletions .github/.github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
shamimice3@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
32 changes: 32 additions & 0 deletions .github/.github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

## Pull Request Process
1. Update the README.md with details of changes including example hcl blocks and [example files](./examples) if appropriate.
2. Run pre-commit hooks `pre-commit run -a`.
3. Once all outstanding comments and checklist items have been addressed, your contribution will be merged! Merged PRs will be included in the next release. The maintainers take care of updating the CHANGELOG as they merge.

## Checklists for contributions
- [ ] Add [semantics prefix](#semantic-pull-requests) to your PR or Commits (at least one of your commit groups)
- [ ] CI tests are passing
- [ ] `README.md` has been updated after any changes. The variables and outputs in the README.md has been generated (using the `terraform_docs` pre-commit hook).
- [ ] Run pre-commit hooks `pre-commit run -a`

## Semantic Pull Requests
To generate changelog, Pull Requests or Commits must have semantic and must follow conventional specs below:

- `feat:` for new features. `example: feat(new featute): added new feature`
- `fix:` for bug fixes
- `docs:` for documentation and examples
- `refactor:` for code refactoring
- `ci:` for CI purpose
- `test:` Adding missing tests or correcting existing tests

## Pull Request Template
- [ ] A new feature (PR prefix `feat`)
- [ ] A bug fix (PR prefix `fix`)
- [ ] Documentation only changes (PR prefix `docs`)
- [ ] A code change that neither fixes a bug nor adds a feature (PR prefix `refactor`)
- [ ] Changes to our CI configuration files and scripts (PR prefix `ci`)
- [ ] Adding missing tests or correcting existing tests (PR prefix `test`)
20 changes: 20 additions & 0 deletions .github/.github/workflows/greetings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Greetings
on:
issues:
pull_request_target:
types: [ opened ]
workflow_dispatch:

jobs:
welcome:
permissions: write-all
name: Welcome Step
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
with:
github-token: ${{ secrets.RELEASE_TOKEN }}
issue-message: '<h1>It''s great having you contribute to this project</h1> Welcome to the community :nerd_face: :rocket:'
pr-message: '<h1>It''s great having you contribute to this project</h1> Welcome to the community :nerd_face:'
footer: "Soon one of our maintainers will review it and provide you with feedback/suggestions. If you think it's something urgent, feel free to reach out <a href='https://www.linkedin.com/in/shamimice03'>Md Shamim</a> on <b>LinkedIn</b>. Please star ⭐ this repo to show us support.</b><br><br><b>Happy, Open Source!</b>"
78 changes: 78 additions & 0 deletions .github/.github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: pre-commit

on:
# push:
pull_request:
branches:
- main
workflow_dispatch:


env:
TERRAFORM_DOCS_VERSION: v0.16.0
TFLINT_VERSION: v0.44.1


jobs:
collectInputs:
name: collect workflow inputs
runs-on: ubuntu-latest
outputs:
directories: ${{steps.dirs.outputs.directories}}
steps:
- uses: actions/checkout@v3
- name: list of directories that contain a versions.tf
id: dirs
uses: clowdhaus/terraform-composite-actions/directories@v1.8.3

preCommitOnMinVersion:
name: pre-commit on min version
needs: collectInputs
runs-on: ubuntu-latest
strategy:
matrix:
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
steps:
- uses: actions/checkout@v3
- name: find out min and max versions
id: minMax
uses: clowdhaus/terraform-min-max@v1.2.4
with:
directory: ${{ matrix.directory }}
- name: pre-commit on TF ${{ steps.minMax.outputs.minVersion }}
# except root directory
if: matrix.directory != '.'
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
with:
terraform-version: ${{ steps.minMax.outputs.minVersion }}
tflint-version: ${{ env.TFLINT_VERSION }}
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'

- name: pre-commit on TF ${{ steps.minMax.outputs.minVersion }}
# on root directory
if: matrix.directory == '.'
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
with:
terraform-version: ${{ steps.minMax.outputs.minVersion }}
tflint-version: ${{ env.TFLINT_VERSION }}
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'

preCommitOnMaxVersion:
name: pre-commit on max version
runs-on: ubuntu-latest
needs: collectInputs
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: find out min and max versions
id: minMax
uses: clowdhaus/terraform-min-max@v1.2.4
- name: pre-commit on TF ${{ steps.minMax.outputs.maxVersion }}
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
with:
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
tflint-version: ${{ env.TFLINT_VERSION }}
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
install-hcledit: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Release
on:
workflow_dispatch:
push:
branches:
- main
branches:
- main

jobs:
release:
Expand All @@ -18,14 +18,14 @@ jobs:
with:
persist-credentials: false
fetch-depth: 0

- name: Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 18.0.0 # https://semantic-release.gitbook.io/semantic-release/v/beta/extending/plugins-list
extra_plugins: |
extra_plugins: |
@semantic-release/changelog@6.0.0
@semantic-release/git@10.0.0
conventional-changelog-conventionalcommits@4.6.3
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # Personal Access Token
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ override.tf.json

# Ignore CLI configuration files
.terraformrc
terraform.rc
terraform.rc
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ repos:
rev: v4.4.0
hooks:
- id: check-merge-conflict
#- id: end-of-file-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
}
]
]
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Loading

0 comments on commit 8015539

Please sign in to comment.