Browse Source

ci: Ensure lock directory exists (#11383)

* ci: Ensure lock directory exists

* Use better construct
Joshua M. Boniface 1 year ago
parent
commit
40a20bbf76
1 changed files with 5 additions and 1 deletions
  1. 5 1
      .github/workflows/ci-openapi.yml

+ 5 - 1
.github/workflows/ci-openapi.yml

@@ -174,6 +174,10 @@ jobs:
           debug: false
           debug: false
           script_stop: false
           script_stop: false
           script: |
           script: |
+            if ! test -d /run/workflows; then
+                sudo mkdir -p /run/workflows
+                sudo chown ${{ secrets.REPO_USER }} /run/workflows
+            fi
             (
             (
             flock -x -w 300 200 || exit 1
             flock -x -w 300 200 || exit 1
             TGT_DIR="/srv/repository/main/openapi"
             TGT_DIR="/srv/repository/main/openapi"
@@ -196,4 +200,4 @@ jobs:
                 sudo rm ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
                 sudo rm ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
                 sudo ln -s unstable/${LAST_SPEC} ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
                 sudo ln -s unstable/${LAST_SPEC} ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
             fi
             fi
-            ) 200>/run/openapi-unstable.lock
+            ) 200>/run/workflows/openapi-unstable.lock