ci: added checkout step to workflow
Some checks failed
CI / build-and-publish (push) Has been cancelled
Some checks failed
CI / build-and-publish (push) Has been cancelled
This commit is contained in:
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@@ -13,6 +13,22 @@ jobs:
|
|||||||
shell: sh
|
shell: sh
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
apk add --no-cache git
|
||||||
|
|
||||||
|
GIT_URL="https://${GITEA_TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git"
|
||||||
|
git clone --depth 1 --branch "$GITHUB_REF_NAME" "$GIT_URL" .
|
||||||
|
|
||||||
|
if [ "$(git rev-parse HEAD)" != "$GITHUB_SHA" ]; then
|
||||||
|
echo "Fetching exact commit $GITHUB_SHA..."
|
||||||
|
git fetch origin "$GITHUB_SHA" --depth 1
|
||||||
|
git checkout "$GITHUB_SHA"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci --prefer-offline
|
run: npm ci --prefer-offline
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user