Skip to content

Commit 0654ef6

Browse files
authored
Use automated PR to update docs version (#4606)
1 parent 5cbf52a commit 0654ef6

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed
Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
name: Update docs version
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [ published ]
66

77
jobs:
8-
build:
9-
if: github.repository == 'testcontainers/testcontainers-java'
10-
runs-on: ubuntu-18.04
11-
steps:
12-
- uses: actions/checkout@v2
13-
with:
14-
ref: master
15-
- name: Update latest_version property in mkdocs.yml
16-
run: |
17-
sed -i "s/latest_version: .*/latest_version: ${GITHUB_REF##*/}/g" mkdocs.yml
18-
git diff
19-
- name: Commit changes
20-
run: |
21-
git config user.email "[email protected]"
22-
git config user.name "GitHub Action - Update docs version"
23-
git add mkdocs.yml
24-
git commit -m "Update documentation version to ${GITHUB_REF##*/}" -m "skip-checks: true" || echo "not changed"
25-
- name: Push changes
26-
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
27-
with:
28-
github_token: ${{ secrets.GITHUB_TOKEN }}
8+
build:
9+
if: github.repository == 'testcontainers/testcontainers-java'
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
ref: master
15+
- name: Update latest_version property in mkdocs.yml
16+
run: |
17+
sed -i "s/latest_version: .*/latest_version: ${GITHUB_REF##*/}/g" mkdocs.yml
18+
git diff
19+
- name: Create Pull Request
20+
uses: peter-evans/create-pull-request@3c3d696d5b8aa2eb0e70f76c251e4b149122acf1 # v3.10.1
21+
with:
22+
title: Update docs version to ${GITHUB_REF##*/}
23+
body: |
24+
Update docs version to ${GITHUB_REF##*/}
25+
skip-checks: true
26+
branch: update-docs-version
27+
delete-branch: true

0 commit comments

Comments
 (0)