add srcinfo #18
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: SRCINFO | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
run-srcinfo: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Fetch | |
run: | | |
wget https://raw.githubusercontent.com/oklopfer/debs/master/misc/srcinfo.sh | |
sudo chmod +x ./srcinfo.sh | |
- name: Run | |
run: | | |
for i in $(git diff HEAD~1 --name-only | grep -E '^packages/[^/]+/[^/]+\.pacscript$'); do | |
./srcinfo.sh "$i" | tee ${i%/*.pacscript}/.SRCINFO > /dev/null | |
done | |
rm ./srcinfo.sh | |
- name: Push | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | |
git add . | |
git commit -m "update .SRCINFO" && git push origin HEAD:master || echo "Nothing to push." |