Skip to content

Commit

Permalink
Update update-images.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
brunurb authored Oct 31, 2024
1 parent 32b7347 commit 8f95de4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions gallery/.github/workflows/update-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,32 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main # or 'master' depending on your default branch name
ref: master # Make sure this matches your default branch name

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: List directory structure
- name: Debug Directory Contents
run: |
echo "Current directory:"
pwd
echo "Directory contents:"
ls -la
echo "Pictures directory contents:"
ls -la pictures/
- name: Run updateMosaic.js
run: |
node updateMosaic.js
- name: Verify images.js
run: cat images.js
echo "Generated images.js contents:"
cat images.js
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add images.js
git diff --quiet && git diff --staged --quiet || (git commit -m "Update images.js [skip ci]" && git push)
git commit -m "Update images.js [skip ci]" || echo "No changes to commit"
git push

0 comments on commit 8f95de4

Please sign in to comment.