TEIC / TEI

The Text Encoding Initiative Guidelines
https://www.tei-c.org
Other
279 stars 88 forks source link

GitHub jobs failing due to permissions error #2399

Closed joeytakeda closed 1 year ago

joeytakeda commented 1 year ago

In GitHub, the test job fail when running the Tests from the Stylesheets repo due to a permissions error:

https://github.com/TEIC/TEI/actions/runs/4224874009/jobs/7336394765#step:6:72

From what I can tell, this is a fairly widespread issue for containers running in GitHub runners due to a recent debian security upgrade (see threads here: https://github.com/actions/runner-images/issues/6775 and https://github.com/actions/checkout/issues/1169)

Following the advice from https://github.com/actions/checkout/issues/1169, I think marking the directory as safe in Git after the checkout step would work to solve the issue until actions/checkout implements a fix:

      - name: Checkout Stylesheets repo
        uses: actions/checkout@v3
        with:
          repository: TEIC/Stylesheets
          ref: dev
          path: Stylesheets
      - name: Fix permissions
         run: git config --system --add safe.directory /github/workspace
ebeshero commented 1 year ago

@joeytakeda I confirm I'm seeing this exact problem on a new branch I just pushed: https://github.com/TEIC/TEI/actions/runs/4395340700/jobs/7697064380

joeytakeda commented 1 year ago

Have now sent up a fix in branch iss2399_gh_test. My proposed fix above did not work, but (go figure!) the suggested one from git did (and of course the /github/workspace one wouldn't have since the working directory mounted in Docker is /__w/ in the action).

One interesting thing here is that the generate specList workflow should have the same issue, but it hasn't been a problem yet since it's using actions/checkout@v2 and not @v3. It should be @v3, though, since @v2 uses a deprecated version of node (12).