Skip to content

Commit

Permalink
Merge branch 'main' into add-overview-connectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
pipo02mix authored May 3, 2024
2 parents 9383de1 + c56ceb9 commit 3988900
Show file tree
Hide file tree
Showing 106 changed files with 2,848 additions and 420 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
architect: giantswarm/[email protected].5
architect: giantswarm/[email protected].6

jobs:
test:
Expand Down
63 changes: 34 additions & 29 deletions .github/workflows/merge-autogenerated-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,42 @@ on:
jobs:
merge-autogenerated-content:
runs-on: ubuntu-latest
permissions:
checks: read
contents: write
pull-requests: write
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1.9.3
with:
app-id: ${{ vars.AUTO_MERGE_DOCS_PRS_APP }}
private-key: ${{ secrets.AUTO_MERGE_DOCS_PRS_APP }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: "automatic-update-of-generated-content"
fetch-depth: 0

- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Update self-generated content branch with main branch changes
uses: prompt/actions-merge-branch@v2
with:
from: "origin/main"

- name: Merge autogenerated pull request
run: |
PR_TITLE="Semi-automatic update of generated content"
- name: Find Pull Request
uses: juliangruber/find-pull-request-action@v1
id: find-pull-request
with:
branch: automatic-update-of-generated-content

# List all open pull requests
PRS=$(gh pr list -S "open" -R ${{ github.repository }} -L 100 | awk '{print $1}')
- name: Approve Pull Request
uses: juliangruber/approve-pull-request-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.find-pull-request.outputs.number }}

for PR in $PRS
do
# Get the title of the current pull request
CURRENT_PR_TITLE=$(gh pr view $PR -R ${{ github.repository }} --json title -q '.title')
echo "PR TITLE -> $CURRENT_PR_TITLE"
if [ "$CURRENT_PR_TITLE" = "$PR_TITLE" ]
then
# Merge the pull request
gh pr merge $PR -R ${{ github.repository }} --merge --admin
echo "Merged pull request #$PR"
break
fi
done
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: GitHub Checks
uses: poseidon/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Merge Pull Request
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.find-pull-request.outputs.number }}
method: squash
18 changes: 9 additions & 9 deletions .github/workflows/update-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# generated content in these sections:
# - Changes and releases
# - CRDs (Management API)
# - Cluster Apps
# - CLI versions
# - Website header and footer
name: Update generated content
Expand All @@ -15,14 +16,12 @@ on:

jobs:
update-generated-content:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Aggregate releases
env:
Expand All @@ -39,12 +38,13 @@ jobs:
run: make update-website-content

- name: Create or update pull request
uses: gr2m/create-or-update-pull-request-action@v1.3.1
uses: gr2m/create-or-update-pull-request-action@v1.9.4
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
title: Semi-automatic update of generated content
title: "Semi-automatic update of generated content"
branch: "automatic-update-of-generated-content"
commit-message: "Update self-generated content"
assignees: taylorbot
reviewers: pipo02mix
body: |
Expand All @@ -53,10 +53,10 @@ jobs:
- Changes and releases
- CLI versions
- Cluster Apps
- CRD pages
- Website header and footer
up-to-date.
This PR is opened every Monday morning and merged on Friday automatically
if it has not been manually merged.
This PR is opened or updated every weekday morning. On Fridays, it is merged by 'merge-autogenerated-content' workflow. In case of being triggered manually you need to merge it manually too in order to have the content published.
33 changes: 33 additions & 0 deletions .github/workflows/validate-prose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Vale
on:
- pull_request

jobs:
vale:
name: vale
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3

- name: Execute Vale
run: |
wget -q https://github.com/errata-ai/vale/releases/download/v3.4.1/vale_3.4.1_Linux_64-bit.tar.gz
mkdir bin && tar -xvzf vale_3.4.1_Linux_64-bit.tar.gz -C bin
ls -la bin
bin/vale --config=./.vale.ini \
--glob '!{src/content/vintage/**,src/content/changes/**}' \
--no-exit \
--output ./.vale/styles/rdjsonl.tmpl \
src/content > out.jsonl
- name: Install reviewdog
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0
with:
reviewdog_version: latest

- name: Create annotations on touched files
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog -f=rdjsonl -name=Vale -reporter=github-pr-annotations -fail-on-error=true -filter-mode=added -level=info < out.jsonl
30 changes: 30 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
StylesPath = .vale/styles

Vocab = docs

Packages = Hugo, Microsoft

[src/content/*.md]
MinAlertLevel = suggestion
BasedOnStyles = Vale, Microsoft

# Microsoft.We disallows the use of "we" or "us". At Giant Swarm we are using this in many places for now.
Microsoft.We = NO

# No linting at all for the /vintage section
[src/content/vintage/*.md]
MinAlertLevel = error
BasedOnStyles = Vale
Vale.Avoid = NO
Vale.Repetition = NO
Vale.Spelling = NO
Vale.Terms = NO

# No linting at all for the /changes section
[src/content/changes/*.md]
MinAlertLevel = error
BasedOnStyles = Vale
Vale.Avoid = NO
Vale.Repetition = NO
Vale.Spelling = NO
Vale.Terms = NO
10 changes: 10 additions & 0 deletions .vale/styles/.vale-config/0-Hugo.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*.md]
# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}})
TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \
(\[.+\]\({{< .+ >}}\)), \
[^\S\r\n]({{[%<] \w+ .+ [%>]}})\s, \
[^\S\r\n]({{[%<](?:/\*) .* (?:\*/)[%>]}})\s

# Exclude `{{< myshortcode `This is some <b>HTML</b>, ... >}}`
BlockIgnores = (?sm)^({{[%<] \w+ [^{]*?\s[%>]}})\n$, \
(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}})
9 changes: 9 additions & 0 deletions .vale/styles/Microsoft/AMPM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: Use 'AM' or 'PM' (preceded by a space).
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
level: error
nonword: true
tokens:
- '\d{1,2}[AP]M'
- '\d{1,2} ?[ap]m'
- '\d{1,2} ?[aApP]\.[mM]\.'
30 changes: 30 additions & 0 deletions .vale/styles/Microsoft/Accessibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
extends: existence
message: "Don't use language (such as '%s') that defines people by their disability."
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/accessibility-terms
level: suggestion
ignorecase: true
tokens:
- a victim of
- able-bodied
- an epileptic
- birth defect
- crippled
- differently abled
- disabled
- dumb
- handicapped
- handicaps
- healthy person
- hearing-impaired
- lame
- maimed
- mentally handicapped
- missing a limb
- mute
- non-verbal
- normal person
- sight-impaired
- slow learner
- stricken with
- suffers from
- vision-impaired
64 changes: 64 additions & 0 deletions .vale/styles/Microsoft/Acronyms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
extends: conditional
message: "'%s' has no definition."
link: https://docs.microsoft.com/en-us/style-guide/acronyms
level: suggestion
ignorecase: false
# Ensures that the existence of 'first' implies the existence of 'second'.
first: '\b([A-Z]{3,5})\b'
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
# ... with the exception of these:
exceptions:
- API
- ASP
- CLI
- CPU
- CSS
- CSV
- DEBUG
- DOM
- DPI
- FAQ
- GCC
- GDB
- GET
- GPU
- GTK
- GUI
- HTML
- HTTP
- HTTPS
- IDE
- JAR
- JSON
- JSX
- LESS
- LLDB
- NET
- NOTE
- NVDA
- OSS
- PATH
- PDF
- PHP
- POST
- RAM
- REPL
- RSA
- SCM
- SCSS
- SDK
- SQL
- SSH
- SSL
- SVG
- TBD
- TCP
- TODO
- URI
- URL
- USB
- UTF
- XML
- XSS
- YAML
- ZIP
Loading

0 comments on commit 3988900

Please sign in to comment.