Update Lists #3588
This file contains hidden or 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: "Update Lists" | |
on: | |
schedule: | |
- cron: "*/15 * * * *" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
sync-files: | |
name: "Run sync" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout source repository" | |
uses: actions/checkout@v4 | |
- name: "Run lister" | |
run: | | |
AM2PLA_SCRIPT=$(curl -Ls https://raw.githubusercontent.com/ivan-hc/AM/main/tools/am2pla-site) | |
[ -n "$AM2PLA_SCRIPT" ] && echo "$AM2PLA_SCRIPT" | grep -q "^AMREPO=" && echo "◆ Update am2pla-site script..." && echo "$AM2PLA_SCRIPT" > ./am2pla-site | |
sed -i 's/^cd "$(xdg-user-dir DESKTOP)"/#cd "$(xdg-user-dir DESKTOP)"/g' ./am2pla-site | |
#chmod a+x ./am2pla-site | |
./am2pla-site | |
- name: "Push to Source" | |
run: | | |
git config --global user.name "Portable-Linux-Apps" | |
git config --global user.email "[email protected]" | |
git add *.md *.json am2pla-site | |
if git diff-index --quiet HEAD; then | |
echo "No changes to commit." >> $GITHUB_STEP_SUMMARY | |
else | |
git commit -m "Sync files from source repository" | |
git push && echo "Sync to Source succeeded" >> $GITHUB_STEP_SUMMARY | |
fi |