Skip to content

Commit

Permalink
test new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwd9000-ML committed Jul 13, 2023
1 parent a953483 commit 82d9de3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ updates:
schedule:
interval: "weekly"
day: "sunday"
time: "09:00"
time: "05:00"
timezone: "Europe/London"

- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
time: "05:00"
timezone: "Europe/London"
29 changes: 27 additions & 2 deletions .github/workflows/dependency-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
# Dependabot will open a PR on terraform version changes, this 'dependabot' job is only used to test TF version changes by running a plan, apply and destroy in sequence.
dependabot-plan-apply-destroy:
dependabot_plan_apply_destroy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand Down Expand Up @@ -40,12 +40,37 @@ jobs:
arm_tenant_id: ${{ secrets.ARM_TENANT_ID }} ## (Required - Dependabot Secrets) ARM Tenant ID
github_token: ${{ secrets.GITHUB_TOKEN }} ## (Required) Needed to comment output on PR's. ${{ secrets.GITHUB_TOKEN }} already has permissions.


##### If dependency tests are successful update all readme documentation using terraform-docs #####
update_docs:
needs: dependabot_plan_apply_destroy
runs-on: ubuntu-latest
permissions:
pull-requests: write
repository-projects: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Render terraform docs inside the README.md and push changes back to PR branch
uses: terraform-docs/gh-actions@v1.0.0
with:
find-dir: .
output-file: README.md
output-method: inject
git-push: "true"

##### If dependency tests are successful merge the pull request #####
merge_pr:
needs: dependabot-plan-apply-destroy
needs: update_docs
runs-on: ubuntu-latest
permissions:
pull-requests: write
repository-projects: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,6 @@ if the container group is restarted or powered down/up, data is persisted in the
Enjoy!

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.1 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.62.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | ~> 3.62.1 |
| <a name="provider_random"></a> [random](#provider\_random) | n/a |

## Modules

| Name | Source | Version |
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.64.0"
version = "~> 3.63.0"
}
}
}

0 comments on commit 82d9de3

Please sign in to comment.