/
sdds
/
plasma
Обзор
Документация
Войти
/
sdds
/
plasma
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
dev
.github/workflows/create-changelog-by-commit.yml
61 строка
2 KB
Alexander Lobyntsev
ci: add "Create changelog data" workflow [no ci]
01 апр 2026, 16:42
01 апр 2026, 16:42
29480e9
Код
Авторство
О чём код?
name: Create changelog data on: workflow_dispatch: inputs: commit: description: "Commit for release pull request" required: true jobs: changelog: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.gh_token }} steps: - name: Checkout uses: actions/checkout@v4 with: show-progress: false fetch-depth: 0 ref: master - name: Get associated pull request by commit id: data uses: actions/github-script@v7 with: result-encoding: string script: | const res = await github.rest.repos.listPullRequestsAssociatedWithCommit({ commit_sha: `${{ inputs.commit }}`, owner: context.repo.owner, repo: context.repo.repo, }); const data = res?.data[0].body || ''; return data; - name: Install dependencies run: | cd .github/actions/write-changelog npm ci - name: Write changelog uses: ./.github/actions/write-changelog with: data: ${{ steps.data.outputs.result }} - name: Extract branch name id: branch shell: bash run: echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT - name: Commit & Push changelog files uses: actions-js/push@master with: github_token: ${{ secrets.gh_token }} message: 'chore: Update CHANGELOG.md [skip ci]' branch: ${{ steps.branch.outputs.BRANCH }} author_name: Salute Frontend Team author_email: salute.developers@gmail.com