Hi Junio, On Tue, 17 Sep 2024, Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > > > On Thu, 12 Sep 2024, Beat Bolli wrote: > > > >> Unicode 16 has been announced on 2024-09-10 [0], so update the character > >> width tables to the new version. > >> > >> [0] https://blog.unicode.org/2024/09/announcing-unicode-standard-version-160.html > > > > I can confirm that the output is identical to the result of running > > ./contrib/update-unicode/update_unicode.sh. > > Thanks for double checking. I did the same when I queued the patch > and it indeed looked good. > > > Maybe we should add an automated, scheduled workflow for these updates? > > We could, but the consortium aims to issue major updates once a year > in September, with minor versions and updates "will be avoided", so > we may need to devise automation that makes better use of resources > than to scrape http://www.unicode.org/Public/UCD/latest/ucd/ daily. Oh, but I obviously was not suggesting as crude a thing as to scrape it unconditionally, and certainly not daily. No, I was thinking about something checking the `Last-Modified:` header and only acting upon updated Unicode definitions, and checking for updates only on a weekly basis. Something along these lines: ```yml name: update Unicode definitions on: schedule: - cron: '1 15 * * 4' # 3:01pm on Wednesdays workflow_dispatch: jobs: update-repo-variable: if: vars.UNICODE_LAST_MODIFIED != '' runs-on: ubuntu-latest steps: - id: check run: | set -x latest_update="$(curl -I https://www.unicode.org/Public/UCD/latest/ucd/UCD.zip | sed -n 's/^Last-Modified: //p')" && if test '${{ vars.UNICODE_LAST_MODIFIED }}' = "$latest_update" then echo "result=skip" >>$GITHUB_OUTPUT exit 0 fi echo "result=$latest_update" >>$GITHUB_OUTPUT - if: steps.check.outputs.result != 'skip' run: echo ::notice::_Now_ we scrape and do stuff - if: steps.check.outputs.result != 'skip' env: GH_TOKEN: ${{ secrets.UNICODE_LAST_MODIFIED_PAT }} run: | gh api -X PATCH \ repos/$GITHUB_REPOSITORY/actions/variables/UNICODE_LAST_MODIFIED \ -f value='${{ steps.check.outputs.result }}' This would use the repository variable `UNICODE_LAST_MODIFIED` to store the `Last-Modified:` value that was last seen (and implicitly act as the knob to prevent running in forks: if the variable is not yet set, the job will be skipped). Sadly, to update the repository variable, we cannot use `permissions:` because the workflow syntax does not offer the `variables` scope. Therefore a Personal Access Token would need to be stored as a repository secret. I used a fine-grained token in my tests whose sope was Repository > Variables: read-write. Ciao, Johannes > > 44dc651132 2024-09-12T22:40:47+02:00 unicode: update the width tables to Unicode 16 > 872976c37e 2023-09-25T21:07:04+02:00 unicode: update the width tables to Unicode 15.1 > b10cbdac4c 2023-03-30T21:15:17+02:00 unicode: update the width tables to Unicode 15 > 187fc8b8b6 2021-09-17T12:19:20-07:00 unicode: update the width tables to Unicode 14 > 65588b0b2e 2020-03-17T16:36:05+01:00 unicode: update the width tables to Unicode 13.0 > 5817f9caa3 2019-05-29T22:50:45+02:00 unicode: update the width tables to Unicode 12.1 > 584b62c37b 2019-03-21T22:06:17+01:00 unicode: update the width tables to Unicode 12 > 570951eea2 2018-07-09T21:44:52+02:00 unicode: update the width tables to Unicode 11 > e233bef43e 2018-04-10T14:26:17-07:00 unicode_width.h: rename to use dash in file name > >