ci: Ensure lock directory exists (#11383)

* ci: Ensure lock directory exists

* Use better construct
This commit is contained in:
Joshua M. Boniface 2024-04-18 09:29:31 -04:00 committed by GitHub
parent 7d67443aca
commit 40a20bbf76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -174,6 +174,10 @@ jobs:
debug: false
script_stop: false
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
TGT_DIR="/srv/repository/main/openapi"
@ -196,4 +200,4 @@ jobs:
sudo rm ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
sudo ln -s unstable/${LAST_SPEC} ${TGT_DIR}/jellyfin-openapi-unstable_previous.json
fi
) 200>/run/openapi-unstable.lock
) 200>/run/workflows/openapi-unstable.lock