fix: add missing build args to workflow
This commit is contained in:
@@ -10,13 +10,13 @@ jobs:
|
||||
steps:
|
||||
- name: Trigger BuildKit Build
|
||||
run: |
|
||||
echo "Building commit: ${GITHUB_SHA}"
|
||||
echo "Building commit: \"\""
|
||||
|
||||
# Delete old job
|
||||
kubectl delete job build-manoon-headless-action -n gitea --ignore-not-found=true 2>/dev/null || true
|
||||
|
||||
# Create build job
|
||||
cat << 'JOBEOF' | kubectl apply -f -
|
||||
cat << "JOBEOF" | kubectl apply -f -
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
@@ -30,39 +30,29 @@ jobs:
|
||||
initContainers:
|
||||
- name: clone
|
||||
image: alpine/git:latest
|
||||
workingDir: /workspace
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
set -ex
|
||||
echo "Cloning repository..."
|
||||
rm -rf /workspace/* /workspace/.[!.]* 2>/dev/null || true
|
||||
git clone --depth 1 http://gitea.gitea.svc.cluster.local:3000/unchained/manoon-headless.git /workspace
|
||||
cd /workspace
|
||||
echo "Successfully cloned: $(git rev-parse --short HEAD)"
|
||||
set -e
|
||||
git clone --depth 1 http://gitea:3000/unchained/manoon-headless.git /workspace
|
||||
cd /workspace && git checkout \"\"
|
||||
echo "Building: \"bd1fa0d\""
|
||||
volumeMounts:
|
||||
- name: workspace
|
||||
mountPath: /workspace
|
||||
containers:
|
||||
- name: build
|
||||
image: moby/buildkit:latest
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
set -e
|
||||
mkdir -p /root/.docker
|
||||
cp /docker-config/.dockerconfigjson /root/.docker/config.json
|
||||
buildctl --addr tcp://buildkit.gitea.svc.cluster.local:1234 build \
|
||||
--frontend dockerfile.v0 \
|
||||
--local context=/workspace \
|
||||
--local dockerfile=/workspace \
|
||||
--opt build-arg:NEXT_PUBLIC_SALEOR_API_URL=https://api.manoonoils.com/graphql/ \
|
||||
--opt build-arg:NEXT_PUBLIC_SITE_URL=https://manoonoils.com \
|
||||
--opt build-arg:NEXT_PUBLIC_OPENPANEL_CLIENT_ID=fa61f8ae-0b5d-4187-a9b1-5a04b0025674 \
|
||||
--opt build-arg:NEXT_PUBLIC_RYBBIT_HOST=https://rybbit.nodecrew.me \
|
||||
--opt build-arg:NEXT_PUBLIC_RYBBIT_SITE_ID=1 \
|
||||
--output type=image,name=ghcr.io/unchainedio/manoon-headless:latest,push=true
|
||||
echo "Build complete! Image pushed to GHCR."
|
||||
buildctl --addr tcp://buildkit.gitea.svc.cluster.local:1234 build --frontend dockerfile.v0 --local context=/workspace --local dockerfile=/workspace --opt build-arg:NEXT_PUBLIC_SALEOR_API_URL=https://api.manoonoils.com/graphql/ --opt build-arg:NEXT_PUBLIC_SITE_URL=https://manoonoils.com --opt build-arg:NEXT_PUBLIC_OPENPANEL_CLIENT_ID=fa61f8ae-0b5d-4187-a9b1-5a04b0025674 --opt build-arg:NEXT_PUBLIC_RYBBIT_HOST=https://rybbit.nodecrew.me --opt build-arg:NEXT_PUBLIC_RYBBIT_SITE_ID=1 --output type=image,name=ghcr.io/unchainedio/manoon-headless:latest,push=true
|
||||
echo "Build complete!"
|
||||
volumeMounts:
|
||||
- name: workspace
|
||||
mountPath: /workspace
|
||||
@@ -78,4 +68,4 @@ jobs:
|
||||
JOBEOF
|
||||
|
||||
echo "Build job created!"
|
||||
kubectl wait --for=condition=complete job/build-manoon-headless-action -n gitea --timeout=600s || echo "Build running in background"
|
||||
kubectl wait --for=condition=complete job/build-manoon-headless-action -n gitea --timeout=600s || echo "Build running in background"
|
||||
|
||||
Reference in New Issue
Block a user