Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Resolves #ISSUE_NUMBER
### Before the change?
<!-- Please describe the current behavior that you are modifying. -->

-
-

### After the change?
<!-- Please describe the behavior or changes that are being added by this PR. -->

-
-

### Pull request checklist

Expand Down
52 changes: 51 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,60 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set-up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- run: make tools
- run: make build
- run: make test

docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set-up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- name: Set-up Terraform
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
with:
terraform_version: latest
terraform_wrapper: false
- run: make checkdocs
- run: make validatedocs
- uses: rvben/rumdl@f3ca9f4962234c3d2b73ac2ce15c0b6ca654d510 # v0.1.84
with:
path: ./docs
report-type: annotations

check:
name: Check
needs:
- ci
- docs
if: always()
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check
run: |
set -euo pipefail
results=( ${{ join(needs.*.result, ' ') }} )
for result in "${results[@]}"; do
if [[ "${result}" == "failure" ]] || [[ "${result}" == "cancelled" ]]; then
echo "::error::Workflow failed!"
exit 1
fi
done
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CodeQL
on:
workflow_dispatch:
push:
branches: ["main"]
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: [ "main" ]
schedule:
- cron: "16 7 * * 5"

Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set-up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
if: matrix.language == 'go'
with:
go-version-file: go.mod
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/dotcom-acceptance-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Acceptance Tests (github.com)

on:
workflow_dispatch:
# push:
workflow_dispatch: # push:

Comment on lines +4 to +5
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be removed?

Suggested change
workflow_dispatch: # push:
workflow_dispatch:

# branches:
# - main
# - release-v*
Expand All @@ -25,7 +25,9 @@ permissions: read-all
jobs:
test:
name: Test ${{ matrix.mode }}
if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || contains(github.event.pull_request.labels.*.name, 'acctest')
if: (github.event_name != 'pull_request' && github.event_name !=
'pull_request_target') ||
contains(github.event.pull_request.labels.*.name, 'acctest')
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -34,7 +36,7 @@ jobs:
deployment: false
strategy:
matrix:
mode: [anonymous, individual, organization] # team, enterprise
mode: [ anonymous, individual, organization ] # team, enterprise
fail-fast: true
max-parallel: 1
defaults:
Expand All @@ -47,7 +49,8 @@ jobs:
- name: Check secrets
if: github.event_name == 'pull_request_target'
env:
INPUT_ALLOWED_SECRETS: ${{ vars.DOTCOM_ACCEPTANCE_TESTS_ALLOWED_SECRETS || 'GH_TEST_TOKEN' }}
INPUT_ALLOWED_SECRETS: ${{ vars.DOTCOM_ACCEPTANCE_TESTS_ALLOWED_SECRETS ||
'GH_TEST_TOKEN' }}
INPUT_SECRETS: ${{ toJSON(secrets) }}
run: |
set -eou pipefail
Expand All @@ -74,7 +77,7 @@ jobs:
echo "token=${GH_TEST_TOKEN}" >> "${GITHUB_OUTPUT}"

- name: Set-up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -104,7 +107,8 @@ jobs:
TF_LOG: WARN
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
GITHUB_BASE_URL: https://api.github.com/
GITHUB_OWNER: ${{ (matrix.mode == 'individual' && vars.GH_TEST_LOGIN) || (matrix.mode == 'organization' && vars.GH_TEST_ORG_NAME) || '' }}
GITHUB_OWNER: ${{ (matrix.mode == 'individual' && vars.GH_TEST_LOGIN) ||
(matrix.mode == 'organization' && vars.GH_TEST_ORG_NAME) || '' }}
Comment on lines +110 to +111
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be made slightly easier to read with case() https://docs.github.com/en/actions/reference/workflows-and-actions/expressions?versionId=free-pro-team@latest&productId=actions#case

Suggested change
GITHUB_OWNER: ${{ (matrix.mode == 'individual' && vars.GH_TEST_LOGIN) ||
(matrix.mode == 'organization' && vars.GH_TEST_ORG_NAME) || '' }}
GITHUB_OWNER: ${{ case(matrix.mode == 'individual', vars.GH_TEST_LOGIN, matrix.mode == 'organization', vars.GH_TEST_ORG_NAME, '') }}

GITHUB_USERNAME: ${{ vars.GH_TEST_LOGIN }}
GITHUB_ENTERPRISE_SLUG: ${{ vars.GH_TEST_ENTERPRISE_SLUG }}
GH_TEST_AUTH_MODE: ${{ matrix.mode }}
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/ghes-acceptance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Acceptance Tests (GHES)

on:
workflow_dispatch:
# pull_request_target:
# types:
# - opened
# - synchronize
# - reopened
# - labeled
# branches:
# - main
# - release-v*
# pull_request_target:
# types:
# - opened
# - synchronize
# - reopened
# - labeled
# branches:
# - main
# - release-v*

concurrency:
group: acctest-ghes-${{ github.ref }}
Expand All @@ -37,7 +37,8 @@ jobs:
- name: Check secrets
if: github.event_name == 'pull_request_target'
env:
INPUT_ALLOWED_SECRETS: ${{ vars.GHES_ACCEPTANCE_TESTS_ALLOWED_SECRETS || 'GHES_TEST_USER_TOKEN' }}
INPUT_ALLOWED_SECRETS: ${{ vars.GHES_ACCEPTANCE_TESTS_ALLOWED_SECRETS ||
'GHES_TEST_USER_TOKEN' }}
INPUT_SECRETS: ${{ toJSON(secrets) }}
run: |
set -eou pipefail
Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
echo "token=${TEST_USER_TOKEN}" >> "${GITHUB_OUTPUT}"

- name: Set-up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fetch-depth: 0

- name: Set-up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
Expand Down Expand Up @@ -67,4 +67,5 @@ jobs:
- name: Attest artifacts
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
with:
subject-checksums: ./dist/${{ github.event.repository.name }}_${{ fromJSON(steps.goreleaser.outputs.metadata).version }}_SHA256SUMS
subject-checksums: ./dist/${{ github.event.repository.name }}_${{
fromJSON(steps.goreleaser.outputs.metadata).version }}_SHA256SUMS
Comment on lines +70 to +71
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Will this line break work?

4 changes: 0 additions & 4 deletions .markdownlint.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions .rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[global]
disable = ["MD013", "MD028"]

[per-file-ignores]
".github/pull_request_template.md" = ["MD041"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I would Ignore MD009 as well in the PR template as the empty lines are meaningful in there

Suggested change
".github/pull_request_template.md" = ["MD041"]
".github/pull_request_template.md" = ["MD041", "MD009"]

"docs/**/*.md" = ["MD059"]

[MD004]
style = "dash"

[MD024]
siblings-only = true

[MD033]
allowed-elements = ["a", "br", "details", "img", "summary", "sub", "sup"]

[MD052]
shortcut-syntax = true
Loading
Loading