mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-27 13:28:51 +07:00
* Fixes #2830 uses actions/create-github-app-token@v2 * Adds github-bot as environment in the job config * Remove extraneous newline --------- Co-authored-by: Maxwell G <maxwell@gtmx.me>
This commit is contained in:
15
.github/workflows/release-porting-guide.yml
vendored
15
.github/workflows/release-porting-guide.yml
vendored
@@ -17,6 +17,7 @@ jobs:
|
||||
upload-porting-guide:
|
||||
name: Extract the porting guide
|
||||
runs-on: ubuntu-latest
|
||||
environment: github-bot
|
||||
env:
|
||||
GIT_BRANCH: "release/porting-guide-${{ inputs.ansible-version }}"
|
||||
ANSIBLE_VERSION_FULL: ${{ inputs.ansible-version }}
|
||||
@@ -28,8 +29,18 @@ jobs:
|
||||
run: echo "ANSIBLE_VERSION_MAJOR=${ANSIBLE_VERSION_FULL%%.*}" >> "${GITHUB_ENV}"
|
||||
shell: bash --noprofile --norc -O extglob -eEuo pipefail {0}
|
||||
|
||||
- name: Generate temp GITHUB_TOKEN
|
||||
id: create_token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ secrets.BOT_APP_ID }} # From github-bot environment
|
||||
private-key: ${{ secrets.BOT_APP_KEY }} # From github-bot environment
|
||||
|
||||
- name: Check out this repo src
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ steps.create_token.outputs.token }}
|
||||
|
||||
- name: Check out ansible-build-data
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -59,11 +70,13 @@ jobs:
|
||||
git commit -m "${CI_COMMIT_MESSAGE}"
|
||||
|
||||
- name: Push to the repo
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
|
||||
run: git push origin "${GIT_BRANCH}"
|
||||
|
||||
- name: Create the porting guide PR as draft
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
|
||||
PR_BODY_MESSAGE: |-
|
||||
##### SUMMARY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user