fix: use runner home dir for work dir
Some checks failed
Build & Deploy / build (push) Failing after 2s
Some checks failed
Build & Deploy / build (push) Failing after 2s
This commit is contained in:
@@ -17,9 +17,10 @@ jobs:
|
||||
|
||||
- name: Generate demo content + Dockerfile
|
||||
run: |
|
||||
cd /workspace
|
||||
[ -d demo-frontend ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git
|
||||
cd demo-frontend
|
||||
WORK=/root/.cache/demo-frontend
|
||||
mkdir -p $WORK
|
||||
cd $WORK
|
||||
[ -d .git ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git .
|
||||
git pull
|
||||
|
||||
cat > package.json <<'EOF'
|
||||
@@ -41,13 +42,13 @@ jobs:
|
||||
|
||||
- name: Build frontend
|
||||
run: |
|
||||
cd /workspace/demo-frontend
|
||||
cd /root/.cache/demo-frontend
|
||||
npm install --silent
|
||||
npm run build
|
||||
|
||||
- name: Docker build & push
|
||||
run: |
|
||||
cd /workspace/demo-frontend
|
||||
cd /root/.cache/demo-frontend
|
||||
SHORT=${GITHUB_SHA::8}
|
||||
TAG="${REGISTRY}/demo-frontend:${SHORT}"
|
||||
LATEST="${REGISTRY}/demo-frontend:latest"
|
||||
|
||||
Reference in New Issue
Block a user