Skip to content

Commit

Permalink
Wiki: improve accuracy (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
audunsolemdal authored Nov 29, 2023
1 parent c57d3e5 commit d038158
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/generate-release-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ jobs:
`.trimLeft(), { encoding: 'utf-8' })
- name: Document example 'source' line
if: ${{ inputs.type == 'terraform'}}
if: ${{ inputs.type == 'terraform' && inputs.rootFolder != '/' }}
run: |
cat > output/documentation.md <<'EOF'
# Module Location
To use this module in your Terraform, use the below source value.
```hcl
module "my_${{ matrix.directory }}" {
module "${{ matrix.directory }}" {
source = "[email protected]:${{ github.repository }}//${{ inputs.rootFolder }}/${{ matrix.directory }}?ref=${{ matrix.directory }}/${{ steps.new-version.outputs.result }}"
# also any inputs for the module (see below)
Expand All @@ -258,6 +258,24 @@ jobs:
EOF
- name: Document example 'source' line
if: ${{ inputs.type == 'terraform' && inputs.rootFolder == '/' }}
run: |
source="miljodir/${{ github.repository }}"
cat > output/documentation.md <<'EOF'
# Module Location
To use this module in your Terraform, use the below source value.
```hcl
module "main" {
source = "[email protected]:${{ github.repository }}?ref=${{ steps.new-version.outputs.result }}"
# also any inputs for the module (see below)
}
```
EOF
- name: Install terraform docs
if: ${{ inputs.type == 'terraform'}}
run: |
Expand Down

0 comments on commit d038158

Please sign in to comment.