Skip to content

Commit 57888a6

Browse files
committed
Use commit
1 parent 3980b5b commit 57888a6

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/generate-release-notes.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
required: true
99
default: 'v2.13'
1010

11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
1115
jobs:
1216
build-and-commit:
1317
runs-on: ubuntu-latest
@@ -30,38 +34,44 @@ jobs:
3034
- name: Install Pandoc
3135
run: sudo apt-get update && sudo apt-get install -y pandoc
3236

33-
- name: Create release notes directory
34-
run: mkdir release-notes
37+
- name: Create release notes build directory
38+
run: mkdir release-notes-build
3539

3640
- name: Convert AsciiDoc to HTML
3741
run: |
3842
VERSION=${{ inputs.version }}
3943
INPUT_FILE="versions/${VERSION}/modules/en/pages/release-notes/${VERSION}.adoc"
40-
OUTPUT_FILE="release-notes/${VERSION}.html"
44+
OUTPUT_FILE="release-notes-build/${VERSION}.html"
4145
4246
if [ ! -f "$INPUT_FILE" ]; then
4347
echo "Error: Input file $INPUT_FILE not found."
4448
exit 1
4549
fi
4650
47-
asciidoctor -o "$OUTPUT_FILE" "$INPUT_FILE"
51+
asciidoctor -v -o "$OUTPUT_FILE" "$INPUT_FILE"
4852
4953
- name: Convert HTML to GitHub-Flavored Markdown
5054
run: |
5155
VERSION=${{ inputs.version }}
52-
HTML_FILE="release-notes/${VERSION}.html"
53-
MARKDOWN_FILE="release-notes/${VERSION}.md"
56+
HTML_FILE="release-notes-build/${VERSION}.html"
57+
MARKDOWN_FILE="release-notes-build/${VERSION}.md"
5458
5559
pandoc --from html-native_divs \
5660
--to gfm \
5761
--lua-filter=./.github/workflows/filters/admonition-filter.lua \
5862
--output "$MARKDOWN_FILE" \
5963
"$HTML_FILE"
6064
61-
- name: Push HTML and Markdown to release-notes branch
65+
- name: Commit files
66+
run: |
67+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
68+
git config --local user.name "github-actions[bot]"
69+
git commit -a -m "Add changes"
70+
71+
- name: Push HTML and Markdown to release-notes-build branch
6272
uses: ad-m/github-push-action@v0.8.0
6373
with:
6474
github_token: ${{ secrets.GITHUB_TOKEN }}
65-
branch: release-notes
75+
branch: release-notes-build
6676
force: true
67-
directory: release-notes
77+
directory: release-notes-build

0 commit comments

Comments
 (0)