action.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: "Update Changelog"
  2. description: "Custom action to update changelog based on input parameters."
  3. inputs:
  4. pr_data:
  5. description: "List of ids"
  6. required: true
  7. changelog_path:
  8. description: "The value associated with the type."
  9. required: true
  10. base_branch:
  11. description: "The base branch for the changelog update"
  12. required: true
  13. suffix:
  14. description: "Suffix for the changelog update"
  15. required: true
  16. runs:
  17. using: "composite"
  18. steps:
  19. - name: Set up Python
  20. uses: actions/setup-python@v4
  21. with:
  22. python-version: "3.x"
  23. - name: Install dependencies
  24. shell: bash
  25. run: |
  26. python -m pip install --upgrade pip
  27. pip install requests
  28. - name: Store PR data to a temporary file
  29. shell: bash
  30. run: |
  31. echo '${{ inputs.pr_data }}' > pr_data.txt
  32. - name: Run update_changelog.py
  33. shell: bash
  34. run: |
  35. git config --local user.email "action@github.com"
  36. git config --local user.name "GitHub Action"
  37. git config --local github.token ${{ env.UPDATE_REPO_TOKEN }}
  38. python ${{ github.action_path }}/update_changelog.py pr_data.txt "${{ inputs.changelog_path }}" "${{ inputs.base_branch }}" "${{ inputs.suffix }}"