Update assets #1422
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 assets | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| on: | |
| # Allow to be run manually | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 19 * * *" | |
| jobs: | |
| update-assets: | |
| if: github.repository_owner == 'openfoodfacts' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Upgrade assets | |
| run: chmod +x ci/update_assets.sh && ci/update_assets.sh | |
| - name: Check for uncommitted changes | |
| id: check-changes | |
| uses: mskri/check-uncommitted-changes-action@v1.0.1 | |
| - name: Create Pull Request | |
| if: steps.check-changes.outputs.outcome == failure() | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| base: develop | |
| commit-message: Update assets | |
| signoff: false | |
| branch: auto-update-assets | |
| delete-branch: true | |
| title: 'chore: Update assets' | |
| body: | | |
| Automated update of asset cache - Link to revert if needed: https://world.openfoodfacts.org/product/093270067481501/a-good-product-for-you-open-food-facts | |