summaryrefslogtreecommitdiffstats
path: root/.github/actions/update_changelog/action.yaml
blob: c82d4aee83f72368ba66fc6496e3f1da78eda91c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "Update Changelog"

description: "Custom action to update changelog based on input parameters."

inputs:
  pr_data:
    description: "List of ids"
    required: true
  changelog_path:
    description: "The value associated with the type."
    required: true
  base_branch:
    description: "The base branch for the changelog update"
    required: true
  suffix:
    description: "Suffix for the changelog update"
    required: true

runs:
  using: "composite"
  steps:
    - name: Set up Python
      uses: actions/setup-python@v6
      with:
        python-version: "3.x"

    - name: Install dependencies
      shell: bash
      run: |
        python -m pip install --upgrade pip
        pip install requests

    - name: Store PR data to a temporary file
      shell: bash
      run: |
        echo '${{ inputs.pr_data }}' > pr_data.txt

    - name: Run update_changelog.py
      shell: bash
      run: |
        git config --local user.email "[email protected]"
        git config --local user.name "GitHub Action"
        git config --local github.token ${{ env.GH_TOKEN }}
        python ${{ github.action_path }}/update_changelog.py pr_data.txt "${{ inputs.changelog_path }}" "${{ inputs.base_branch }}" "${{ inputs.suffix }}"