Update files manifest #10
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: Update Files Manifest | |
on: | |
push: | |
branches: | |
- main | |
- master | |
workflow_dispatch: | |
jobs: | |
update-manifest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
repository: Sivan22/otzaria-library | |
fetch-depth: 1 | |
sparse-checkout: | | |
links | |
אוצריא | |
- name: Generate Files Manifest | |
run: | | |
echo "# Files Manifest - Last Updated: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" > files_manifest.json | |
find ./links ./אוצריא -type f \ | |
-exec stat --format='{"%n": {"modified": "%y"}},' {} \; | \ | |
sed '$ s/,$//' | \ | |
(echo "{" && cat && echo "}") > files_manifest.json | |
- name: Commit and Push Changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: 'Update files manifest' | |
add: 'files_manifest.json' |