extension-registry-changed #458
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
name: extension-registry-changed | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [extension-registry-changed] | |
permissions: | |
contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Preserve | |
run: | | |
mkdir build | |
cp -p registry.json build/ | |
- name: Download | |
run: curl -sL -o registry.json https://registry.k6.io/registry.json | |
- name: Update | |
run: | | |
if ! git diff -s --exit-code registry.json; then | |
echo "Automatic update" > build/msg.txt | |
echo "" >> build/msg.txt | |
${{ github.workspace }}/.github/compare build/registry.json registry.json >> build/msg.txt | |
git config --local user.email 'wayback[bot]@users.noreply.github.com' | |
git config --local user.name 'wayback[bot]' | |
git add registry.json | |
git commit -a -F build/msg.txt | |
git push | |
fi |