Update Firefox Intermediate Certificates #3232
This file contains hidden or 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 Firefox Intermediate Certificates | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Run every hour | |
| - cron: "0 * * * *" | |
| jobs: | |
| update-certificates: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y jq wget zip | |
| - name: Download certificates | |
| run: | | |
| chmod +x ./certificates/download-certificates.sh | |
| ./certificates/download-certificates.sh | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| if git diff --quiet -- ./certificates/firefox-certificates.zip; then | |
| echo "No changes detected in certificates" | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected in certificates" | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Update timestamp | |
| if: steps.check-changes.outputs.has_changes == 'true' | |
| run: | | |
| # Update the last-updated-at file | |
| date -u +"%Y-%m-%dT%H:%M:%SZ" > ./certificates/.last-updated-at | |
| - name: Commit certificate changes | |
| if: steps.check-changes.outputs.has_changes == 'true' | |
| uses: apify/actions/signed-commit@v1.2.0 | |
| with: | |
| message: "chore(certificates): update Firefox intermediate certificates" | |
| add: ./certificates/ | |
| retries: 5 | |
| pull: '--rebase --autostash' | |
| github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} | |
| - name: Summary | |
| run: | | |
| if [ "${{ steps.check-changes.outputs.has_changes }}" == "true" ]; then | |
| echo "✅ Certificates updated successfully" | |
| echo "Last updated: $(cat ./certificates/.last-updated-at)" | |
| else | |
| echo "ℹ️ No certificate changes detected" | |
| fi | |
| echo "Total certificates in archive: $(unzip -l ./certificates/firefox-certificates.zip 2>/dev/null | grep -c '\.crt$' || echo 0)" |