Skip to content

Commit f139427

Browse files
committed
chore: Rebase - Merge remote-tracking branch 'origin' into internal/nginxaas-next
2 parents 7127274 + ec749b9 commit f139427

File tree

392 files changed

+879
-66030
lines changed

Some content is hidden

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

392 files changed

+879
-66030
lines changed

.github/workflows/coveo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
run: sudo apt-get install jq
2626

2727
- name: Generating token for ${{matrix.env_name}} ...
28+
id: generate-token
29+
continue-on-error: true
2830
env:
2931
COVEO_API_KEY: ${{secrets[matrix.env_api_key]}}
3032
COVEO_SEARCH_HUB: "HUB_ES_Nginx_Docs_And_Org"
@@ -61,6 +63,7 @@ jobs:
6163
echo "{\"token\": \"$SEARCH_TOKEN\", \"org_id\": \"${{matrix.env_coveo_org_id}}\"}" > coveo/search_token.json
6264
6365
- name: Upload token for ${{matrix.env_name}}
66+
if: ${{ steps.generate-token.outcome == 'success' }}
6467
uses: actions/upload-artifact@v4
6568
with:
6669
name: ${{matrix.env_name}}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Prune stale branches
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '30 1 * * *' # run every day at 01:30 UTC
6+
7+
jobs:
8+
stale-branches:
9+
runs-on: ubuntu-latest
10+
env:
11+
ORG: nginx
12+
REPO: documentation
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Prune all stale branches
18+
run: |
19+
HAS_MORE="true"
20+
21+
while [ "$HAS_MORE" == "true" ]; do
22+
RESPONSE=$(curl -L -s \
23+
-X GET \
24+
-H "Accept: application/json" \
25+
-s "https://github.com/${{env.ORG}}/${{env.REPO}}/branches/stale")
26+
27+
HAS_MORE=$(echo "$RESPONSE" | jq -r '.payload.has_more')
28+
BRANCHES=$(echo "$RESPONSE" | jq -r '.payload.branches[].name')
29+
30+
for BRANCH in $BRANCHES; do
31+
echo "Deleting branch $BRANCH..."
32+
DELETE_RESPONSE=$(curl -L -s \
33+
-X DELETE \
34+
-H "Accept: application/vnd.github+json" \
35+
-H "Authorization: Bearer ${{env.GITHUB_TOKEN}}" \
36+
-H "X-GitHub-Api-Version: 2022-11-28" \
37+
https://api.github.com/repos/${{env.ORG}}/${{env.REPO}}/git/refs/heads/$BRANCH)
38+
echo "Delete response for branch $BRANCH: $DELETE_RESPONSE"
39+
done
40+
done
41+

content/controller/_index.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

content/controller/admin-guides/_index.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

content/controller/admin-guides/backup-restore/_index.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

content/controller/admin-guides/backup-restore/backup-restore-cluster-config.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

content/controller/admin-guides/backup-restore/backup-restore-embedded-config-db.md

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)