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
|
- name: Generate demo content + Dockerfile
|
||||||
run: |
|
run: |
|
||||||
cd /workspace
|
WORK=/root/.cache/demo-frontend
|
||||||
[ -d demo-frontend ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git
|
mkdir -p $WORK
|
||||||
cd demo-frontend
|
cd $WORK
|
||||||
|
[ -d .git ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git .
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
cat > package.json <<'EOF'
|
cat > package.json <<'EOF'
|
||||||
@@ -41,13 +42,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
run: |
|
||||||
cd /workspace/demo-frontend
|
cd /root/.cache/demo-frontend
|
||||||
npm install --silent
|
npm install --silent
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Docker build & push
|
- name: Docker build & push
|
||||||
run: |
|
run: |
|
||||||
cd /workspace/demo-frontend
|
cd /root/.cache/demo-frontend
|
||||||
SHORT=${GITHUB_SHA::8}
|
SHORT=${GITHUB_SHA::8}
|
||||||
TAG="${REGISTRY}/demo-frontend:${SHORT}"
|
TAG="${REGISTRY}/demo-frontend:${SHORT}"
|
||||||
LATEST="${REGISTRY}/demo-frontend:latest"
|
LATEST="${REGISTRY}/demo-frontend:latest"
|
||||||
|
|||||||
Reference in New Issue
Block a user