diff --git a/.github/workflows/build-additives.yml b/.github/workflows/build-additives.yml new file mode 100644 index 000000000000..254e3beeb4bd --- /dev/null +++ b/.github/workflows/build-additives.yml @@ -0,0 +1,40 @@ +name: Build additives + +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@v4 + + - name: Upgrade assets + run: chmod +x knowledge_panels/build_html.py && knowledge_panels/build_html.py + + - 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@v6 + with: + base: develop + commit-message: Automated update of additives HTML files + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: false + branch: auto-update-assets + delete-branch: true + title: 'chore: Update assets' + body: | + Automated update of additives HTML files