Skip to content

Check for ExifTool Updates #171

Check for ExifTool Updates

Check for ExifTool Updates #171

Workflow file for this run

name: Check for ExifTool Updates
on:
schedule:
- cron: "0 12 * * *" # Run every day at 12 PM UTC
workflow_dispatch: # Allow manual triggering
jobs:
check-updates:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Check for updates
id: check
run: |
# Use our simplified version check script
if node check-version.js; then
echo "update_needed=false" >> $GITHUB_OUTPUT
else
EXIT_CODE=$?
if [ $EXIT_CODE -eq 1 ]; then
echo "update_needed=true" >> $GITHUB_OUTPUT
# Get latest version for PR details
LATEST_VERSION=$(node -e "
const { getLatestExifToolVersion } = require('./lib/version-utils');
getLatestExifToolVersion().then(console.log).catch(process.exit);
")
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
else
exit 1
fi
fi
- name: Update ExifTool
id: update
if: steps.check.outputs.update_needed == 'true'
run: |
# Run update script
npm run update:exiftool
# Get the new version after update
NEW_VERSION_FULL=$(node -p "require('./package.json').version")
echo "changed=true" >> $GITHUB_OUTPUT
# Remove -pre suffix for display
NEW_VERSION=${NEW_VERSION_FULL%-pre}
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "Updated to version: $NEW_VERSION"
- name: Run tests
if: steps.check.outputs.update_needed == 'true'
run: npm test
- name: Create Pull Request
if: steps.check.outputs.update_needed == 'true'
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
sign-commits: true
commit-message: "chore(ExifTool): v${{ steps.check.outputs.latest_version }}"
title: "Update ExifTool to v${{ steps.check.outputs.latest_version }}"
body: |
Updates ExifTool to v${{ steps.check.outputs.latest_version }}.
This is an automated update created by the check-updates workflow.
## Changes
- Updated ExifTool binary to latest version
- Package version updated to ${{ steps.check.outputs.latest_version }}-pre (will be finalized during release)
## Testing
- ✅ Tests passed successfully
## Next Steps
After merging this PR:
1. Go to the Actions tab
2. Run the "Release" workflow to publish to npm
Please review the changes and merge if everything looks good.
branch: update-exiftool-${{ steps.check.outputs.latest_version }}
delete-branch: true
labels: |
dependencies
automated