Skip to content

Commit

Permalink
ci(generate): replace keys using find and sed
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcoatl committed Oct 17, 2023
1 parent 6980629 commit 5881954
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,17 @@ jobs:
with:
name: site

- uses: coatl-dev/actions/simple-git-diff@v0
id: git-diff
- run:
keys=(
"build_dependencies"
"test_dependencies"
)
for key in "${keys[@]}"
do
find _data/formula -name '*.json' -type f -exec sed -i '' "s/$key/core_$key/g" {} +
done

- uses: coatl-dev/actions/gpg-import@v0
if: ${{ success() && steps.git-diff.outputs.diff == 'true' }}
- uses: coatl-dev/actions/gpg-import@coatl
with:
passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }}
private-key: ${{ secrets.COATL_BOT_GPG_PRIVATE_KEY }}
Expand All @@ -66,7 +72,7 @@ jobs:
git add --all
git commit -m "docs: update docs"
git push --force --set-upstream origin coatl-bot-docs-autoupdate
gh pr create --fill
env:
GH_TOKEN: ${{ secrets.COATL_BOT_GH_TOKEN }}
if: ${{ success() && steps.git-diff.outputs.diff == 'true' }}
- uses: coatl-dev/actions/create-pr@coatl
with:
gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }}

0 comments on commit 5881954

Please sign in to comment.