DOCS-4422: CCV Shop - Payment Components and Partial Refunds #2055
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a workflow to automatically convert external markdown links into HTML | |
name: Convert external URLs | |
on: [pull_request] | |
jobs: | |
convert-external-urls: | |
runs-on: ubuntu-latest | |
name: Convert external URLs | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Get specific changed files | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v25 | |
with: | |
files: | | |
content/**/*.md | |
api/**/*.md | |
sha: ${{ github.event.pull_request.head.sha }} | |
base_sha: ${{ github.event.pull_request.base.sha }} | |
- name: Pass filenames to steps.changed-files.outputs.all_changed_files | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: | | |
echo "DOCS_PATHS=${{ steps.changed-files-specific.outputs. all_changed_files }}" >> $GITHUB_ENV | |
- name: Run URL replacer | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: python .github/external-link-replace.py | |
- name: Commit changes and push | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add -A | |
git commit -m "Automated external URL lint." | |
fi | |
git push |