Skip to content

Update API Changelog #10

Update API Changelog

Update API Changelog #10

name: Update API Changelog
on:
workflow_dispatch:
workflow_run:
workflows: ["Release Package"]
branches: [main]
types:
- completed
jobs:
get_changelog:
runs-on: arc-runner-k8s
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Copy API changelog to artifacts
uses: actions/upload-artifact@v3
with:
name: api_changelog
path: CHANGELOG.md
update_wiki:
needs: get_changelog
runs-on: arc-runner-k8s
permissions:
contents: write
steps:
- name: Force update git
run: |
sudo apt-get update
sudo apt-get install -y git-all
- name: Checkout docs
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: unipoll/api.wiki
- name: Copy API changelog from artifacts
uses: actions/download-artifact@v3
with:
name: api_changelog
- name: List files
run: ls -la
- name: Commit update
run: |
git config --global user.name 'Bot'
git config --global user.email 'bot@noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/unipoll/api.wiki
git add CHANGELOG.md
git commit -m "Update API changelog on release" && git push || echo "No changes to commit"