Skip to content

Update Versions

Update Versions #57

Workflow file for this run

name: Update Versions
on:
schedule:
- cron: '0 0 * * *' # Run every day at midnight
workflow_dispatch: # Enables manual triggering
jobs:
update_versions:
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for accurate git operations
# Set up Python 3.9
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
# Install dependencies
- name: Install dependencies
run: |
pip install requests beautifulsoup4
# Run the version update scripts
- name: Run Firefox version script
run: python firefox/get_firefox_versions.py
- name: Run Chrome version script
run: python chrome/get_chrome_versions.py
- name: Run Windows version script
run: python windows/get_windows_versions.py
# Configure Git
- name: Configure Git
run: |
git config user.name "AmineHazi"
git config user.email "aminehazi03@gmail.com"
# Add modified files
- name: Add modified files
run: |
git add firefox/versions/ chrome/versions/ windows/versions/
# Commit and push changes if there are any
- name: Commit and push changes
env:
PAT_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
if ! git diff --cached --quiet; then
git commit -m "Update versions [skip ci]"
git push https://AmineHazi:${PAT_TOKEN}@github.com/Galeax/PackageVersionDate.git HEAD:main
else
echo "No changes to commit."
fi