Skip to content

Commit

Permalink
Lister WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Jan 14, 2025
1 parent ce941a2 commit 333b0e0
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/lister.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Sync Apps Lists to Another Repo"
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync-files:
name: "Run sync"
runs-on: ubuntu-22.04
steps:
- name: "Checkout source repository"
uses: actions/checkout@v4

- name: "Run lister"
run: |
cd programs
chmod a+x appimage-lister-uniq.sh
./appimage-lister-uniq.sh
- name: "Clone Target Repository"
env:
TARGET_REPO_TOKEN: ${{ secrets.TARGET_REPO_TOKEN }}
TARGET_OWNER: Portable-Linux-Apps
TARGET_REPO: Portable-Linux-Apps.github.io
run: |
git clone "https://x-access-token:[email protected]/$TARGET_OWNER/$TARGET_REPO.git" target-repo
- name: "Copy files"
run: |
cp programs/x86_64-appimages programs/i686-appimages programs/aarch64-appimages target-repo/
- name: "Commit and Push Changes"
run: |
cd target-repo
# You have to create PAT (Personal Access Token) with write abillity to target repo
# Save it as secret in repository where action will run (source) with name 'TARGET_REPO_TOKEN'
# Check all paths in script!
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"
git add .
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 succeeded" >> $GITHUB_STEP_SUMMARY
fi

0 comments on commit 333b0e0

Please sign in to comment.