Skip to content

Merge pull request #18 from ingrammicro-xvantage/feature #25

Merge pull request #18 from ingrammicro-xvantage/feature

Merge pull request #18 from ingrammicro-xvantage/feature #25

Workflow file for this run

name: Find and replace in docs.
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Find and Replace
run: |
find docs/ -type f -name "*.md" -exec sed -i 's/openapiclient "github.com\/GIT_USER_ID\/GIT_REPO_ID"/xi_sdk_resellers "https:\/\/github.com\/ingrammicro-xvantage\/xi-sdk-resellers-go"/g' {} +
find docs/ -type f -name "*.md" -exec sed -i 's/openapiclient\.NewConfiguration()/xi_sdk_resellers.NewConfiguration()/g' {} +
find docs/ -type f -name "*.md" -exec sed -i 's/openapiclient\.NewAPIClient(configuration)/xi_sdk_resellers.NewAPIClient(configuration)/g' {} +
- name: Commit changes
run: |
git config --global user.email "${{ secrets.ADMIN_EMAIL }}"
git config --global user.name "${{ secrets.ORG_NAME }}"
if git diff --quiet; then
echo "No changes to commit."
else
git add .
git commit -m "Replace openapiclient with Ingrammicroresellerapi"
git push https://${{secrets.WORKFLOW_TOKEN}}@github.com/ingrammicro-xvantage/xi-sdk-resellers-go.git main
fi