Skip to content

Commit

Permalink
Add workflow to update GitHub Actions configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Jarno Elovirta <jarno@elovirta.com>
  • Loading branch information
jelovirt committed Nov 10, 2023
1 parent d548e10 commit 343d898
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
if: false
env:
WEBSITE_PLUGIN_BRANCH: 'master'
DITA_OT_VERSION: '4.0.1'
Expand Down Expand Up @@ -112,7 +113,38 @@ jobs:
commit-message: 'Update ‘${{ env.RELEASE }}’ docs for ${{ github.event.inputs.dita-ot-version }}'
committer: 'DITA-OT Bot <ditaotbot@gmail.com>'
signoff: true
token: ${{ secrets.COMMITTER_TOKEN }}
token: ${{ secrets.DOCS_RELEASE_TOKEN }}
path: website
labels: |
release-updates
update-ci:
runs-on: ubuntu-latest
steps:
- name: Check out docs
uses: actions/checkout@v4
with:
ref: develop

- name: Update GitHub Actions release workflow
uses: mikefarah/yq@master
with:
cmd: yq -i '.jobs.deploy.env.DITA_OT_VERSION = "${{ github.event.inputs.dita-ot-version }}"' '.github/workflows/release.yml'
- name: Update GitHub Actions render action
uses: mikefarah/yq@master
with:
cmd: yq -i '.inputs.DITA_OT_VERSION.default = "${{ github.event.inputs.dita-ot-version }}"' '.github/actions/render/action.yml'

- name: Create release PR
uses: peter-evans/create-pull-request@v5
with:
branch: feature/update-github-actions-${{ github.event.inputs.dita-ot-version }}
title: 'Update docs GitHub Actions for ${{ github.event.inputs.dita-ot-version }}'
body: |
Update docs GitHub Actions for ${{ github.event.inputs.dita-ot-version }}.
commit-message: 'Update GitHub Actions for ${{ github.event.inputs.dita-ot-version }}'
committer: 'DITA-OT Bot <ditaotbot@gmail.com>'
signoff: true
token: ${{ secrets.DOCS_RELEASE_TOKEN }}
labels: |
release-updates

0 comments on commit 343d898

Please sign in to comment.