Skip to content

Commit 728ba21

Browse files
authored
Merge pull request #1796 from cncf/main
Update dev-pt with the main branch
2 parents 2eab097 + 71d092a commit 728ba21

File tree

145 files changed

+3117
-304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+3117
-304
lines changed

.devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node",
3+
"features": {
4+
"ghcr.io/devcontainers/features/hugo:1": {
5+
"extended": true
6+
}
7+
},
8+
"postCreateCommand": "git submodule update --init --recursive && npm install"
9+
}

.github/settings.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ collaborators:
3636
- username: iamNoah1
3737
permission: maintain
3838

39+
- username: thetwopct
40+
permission: push
41+
3942
# English approvers (approver for all files in repository)
4043

4144

@@ -127,6 +130,9 @@ collaborators:
127130
# l10n es approvers
128131
- username: raelga
129132
permission: push
133+
134+
- username: ramrodo
135+
permission: push
130136

131137
- username: electrocucaracha
132138
permission: push
@@ -335,6 +341,7 @@ branches:
335341
# es approvers
336342
users:
337343
- raelga
344+
- ramrodo
338345
- electrocucaracha
339346
- krol3
340347
- 92nqb

.github/workflows/check-outdated-terms.yaml

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
name: Check outdated terms
44
on:
55
pull_request:
6-
paths:
7-
- 'content/en/**.md'
86
branches:
97
- 'dev-ko' # add other branches or use wildcard 'dev-**'
8+
paths:
9+
- 'content/en/**.md'
1010

1111
jobs:
1212
check-outdated-terms:
1313
name: Check outdated terms
14+
15+
# if: contains(fromJSON('["dev-ko", "dev-xx"]'), github.base_ref)
16+
# Ref: https://docs.github.com/en/actions/learn-github-actions/expressions
17+
18+
if: github.base_ref == 'dev-ko'
1419

1520
# Condition to run this workflow on the upstream repository
1621
#if: github.repository == 'cncf/glossary'
@@ -30,6 +35,9 @@ jobs:
3035
L10N_BRANCH="${{github.base_ref}}"
3136
echo "(DEBUG) L10N Branch: ${L10N_BRANCH}"
3237
38+
# Set output direcory
39+
OUTPUT_DIR="./outdated"
40+
3341
# Set L10n directory and code
3442
case "${L10N_BRANCH}" in
3543
dev-ko)
@@ -46,10 +54,11 @@ jobs:
4654
echo "(DEBUG) L10N Directory: ${L10N_DIR}"
4755
echo "(DEBUG) L10N Code: ${L10N_CODE}"
4856
49-
# Set L10N_DIR and L10N_CODE as environment variables
57+
# Set L10N_DIR, L10N_CODE, and OUTPUT_DIR as environment variables
5058
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
5159
echo "L10N_DIR=${L10N_DIR}" >> $GITHUB_ENV
52-
echo "L10N_CODE=${L10N_CODE}" >> $GITHUB_ENV
60+
echo "L10N_CODE=${L10N_CODE}" >> $GITHUB_ENV
61+
echo "OUTPUT_DIR=${OUTPUT_DIR}" >> $GITHUB_ENV
5362
5463
- name: Checkout
5564
uses: actions/checkout@v3
@@ -88,38 +97,59 @@ jobs:
8897
echo "(DUBUG) OLD_BRANCH: ${OLD_BRANCH}"
8998
9099
# Make an output directory
91-
mkdir outdated
100+
if [[ ! -e $OUTPUT_DIR ]]; then
101+
mkdir $OUTPUT_DIR
102+
elif [[ ! -d $OUTPUT_DIR ]]; then
103+
echo "$OUTPUT_DIR already exists but is not a directory" 1>&2
104+
fi
92105
93106
# Check outdated only if there is a localized term
94107
# Loop files in a localization directory, which is ${L10N_DIR} (e.g., ./content/ko/)
95108
echo "(DEBUG) Check outdated"
96-
for FILE_PATH in $(find ${L10N_DIR} -name '*.md'); do
97-
# ${MYVAR#pattern}: delete shortest match of pattern from the beginning
98-
FILE_NAME="${FILE_PATH#${L10N_DIR}}"
109+
for L10N_FILE_PATH in $(find ${L10N_DIR} -name '*.md'); do
110+
echo "(DEBUG) L10N_FILE_PATH: ${L10N_FILE_PATH}"
111+
112+
# Note - extracting a pattern-based substring (https://stackoverflow.com/a/19482947)
113+
FILE_PATH="${L10N_FILE_PATH#${L10N_DIR}}"
114+
FILE_DIR=$(dirname ${FILE_PATH})
115+
FILE_NAME=$(basename ${FILE_PATH})
116+
117+
echo "(DEBUG) FILE_PATH: ${FILE_PATH}"
118+
echo "(DEBUG) FILE_DIR: ${FILE_DIR}"
99119
echo "(DEBUG) FILE_NAME: ${FILE_NAME}"
100-
echo "(DEBUG) Localized file path: $FILE_PATH"
101-
echo "(DEBUG) Original file path: ./content/en/${FILE_NAME}"
120+
echo "(DEBUG) Localized file path: $L10N_FILE_PATH"
121+
echo "(DEBUG) Original file path: ./content/en/${FILE_PATH}"
122+
123+
# Create subdirectories
124+
mkdir -p ${OUTPUT_DIR}/${FILE_DIR}
102125
103126
# Actually compare between the old and lastest English terms and log diff in the file
104-
if [[ -f "./content/en/${FILE_NAME}" ]]; then
127+
if [[ -f "./content/en/${FILE_PATH}" ]]; then
105128
# File exists
106-
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_NAME} > ./outdated/${FILE_NAME}
129+
# Check changes
130+
git diff ${OLD_BRANCH}..${LATEST_BRANCH} -- ./content/en/${FILE_PATH} > temp.diff
131+
132+
if [[ -s "temp.diff" ]]; then
133+
echo "(DEBUG) ${FILE_PATH} is outdated."
134+
mv temp.diff ${OUTPUT_DIR}/${FILE_PATH}
135+
fi
136+
107137
else
138+
echo "(DEBUG) ${FILE_PATH} dose not exist."
108139
# File dose not exist (e.g, changed, renamed or removed)
109-
echo "Could not find ${FILE_NAME} in content/en/" > ./outdated/${FILE_NAME}
110-
echo "Need to check if it has been changed, renamed or removed" >> ./outdated/${FILE_NAME}
140+
echo "Could not find ${FILE_PATH} in content/en/" > ${OUTPUT_DIR}/${FILE_PATH}
141+
echo "Need to check if it has been changed, renamed or removed" >> ${OUTPUT_DIR}/${FILE_PATH}
111142
fi
112-
113143
done
114144
115145
echo "(DEBUG) The outdated files"
116-
ls -al ./outdated
146+
ls -al ${OUTPUT_DIR}
117147
118148
- name: Upload output
119149
uses: actions/upload-artifact@v3
120150
with:
121151
name: ${{ env.L10N_CODE }}-outdated-checking-result
122-
path: ./outdated/
152+
path: ${{ env.OUTPUT_DIR }}/
123153

124154
# - name: Create an issue from file
125155
# uses: peter-evans/create-issue-from-file@v4
@@ -128,4 +158,4 @@ jobs:
128158
# content-filepath: ${{ steps.checker.outputs.output_path }}
129159
# labels: |
130160
# outdated
131-
# lang/ko
161+
# lang/ko

.github/workflows/es-spellcheck.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v3
27+
- name: Check word list sort
28+
run: |
29+
set -o errexit
30+
diff content/es/.wordlist.txt <(LC_ALL= sort -f content/es/.wordlist.txt)
2731
- name: GitHub Spellcheck Action
28-
uses: rojopolis/spellcheck-github-actions@0.28.0
32+
uses: rojopolis/spellcheck-github-actions@0.29.0
2933
with:
3034
config_path: content/es/.spellcheck.yml

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
- uses: actions/checkout@v3
2626

2727
- name: GitHub Spellcheck Action
28-
uses: rojopolis/spellcheck-github-actions@0.28.0
28+
uses: rojopolis/spellcheck-github-actions@0.29.0

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/content/bn/ @mitul3737 @Mouly22 @ikramulkayes @Imtiaz1234
3535

3636
# Approvers for Spanish contents
37-
/content/es/ @raelga @electrocucaracha @krol3 @92nqb
37+
/content/es/ @raelga @ramrodo @electrocucaracha @krol3 @92nqb
3838

3939
# Approvers for Chinese contents
4040
/content/zh-cn/ @hanyuancheung @Jacob953 @Rocksnake @Submarinee

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ npm install
3333
```
3434

3535
You can then run the site using `hugo server`.
36+
37+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=cncf/glossary)

0 commit comments

Comments
 (0)