-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c7c218
commit 6a460ab
Showing
6 changed files
with
140 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Terraform Master Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
jobs: | ||
prTitlecheck: | ||
name: PR title check | ||
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == 'main' }} | ||
uses: ./.github/workflows/pr-title.yaml | ||
|
||
preCommitCheck: | ||
name: Terraform Checks | ||
uses: ./.github/workflows/terraform-checks.yaml | ||
|
||
generateDocs: | ||
name: Generate Terraform Docs | ||
needs: preCommitCheck | ||
uses: ./.github/workflows/terraform-docs.yaml | ||
|
||
release: | ||
name: Release module | ||
needs: generateDocs | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
uses: ./.github/workflows/release.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update Configuration from Template | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout template repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: nimisha-gj/terraform-module-template | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: template-repo | ||
|
||
- name: Checkout target repository | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.repository }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
path: target-repo | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions" | ||
git config --global user.email "github-actions@github.com" | ||
- name: Copy files from template repository | ||
run: | | ||
cp template-repo/.editorconfig target-repo/ | ||
cp template-repo/.pre-commit-config.yaml target-repo/ | ||
cp template-repo/LICENSE target-repo/ | ||
cp template-repo/.tflint.hcl target-repo/ | ||
cp template-repo/.releaserc.json target-repo/ | ||
cp template-repo/CODE_OF_CONDUCT.md target-repo/ | ||
cp template-repo/CONTRIBUTING.md target-repo/ | ||
- name: Commit and push changes | ||
run: | | ||
cd target-repo | ||
git add . | ||
git commit -m "Update files from terraform-module-template" | ||
git push |