mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
CI: Don't run git commands if not run on ci
This commit is contained in:
parent
c73f6608b9
commit
06857e58ea
1
.github/workflows/generate_docs.yml
vendored
1
.github/workflows/generate_docs.yml
vendored
@ -15,6 +15,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CHECKOUT_REF: ${{ github.ref }}
|
CHECKOUT_REF: ${{ github.ref }}
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
IS_CI: "true"
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -18,6 +18,11 @@ if git diff --quiet; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Exit if we aren't a CI run to prevent messing with the current git config
|
||||||
|
if [ -z "${IS_CI}" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
REMOTE_URL="$(git config remote.origin.url)"
|
REMOTE_URL="$(git config remote.origin.url)"
|
||||||
TARGET_REPO=${REMOTE_URL/https:\/\/github.com\//github.com/}
|
TARGET_REPO=${REMOTE_URL/https:\/\/github.com\//github.com/}
|
||||||
GITHUB_REPO=https://${GH_TOKEN:-git}@${TARGET_REPO}
|
GITHUB_REPO=https://${GH_TOKEN:-git}@${TARGET_REPO}
|
||||||
|
Loading…
Reference in New Issue
Block a user