CI Using Command Line
Use the raw Dagger command when your CI provider is not GitHub Actions, or when you want to own all surrounding shell steps yourself.
This mode clones the target repository inside Dagger, so the CI runner does not need to mount the repository into the module.
RUSH_DELIVERY_MODULE=github.com/BootstrapLaboratory/rush-delivery@v0.3.2
RUNTIME_FILES_DIR="${RUNNER_TEMP}/rush-delivery-runtime-files"
DEPLOY_ENV_FILE="${RUNNER_TEMP}/dagger-deploy.env"
SOURCE_REPOSITORY_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
mkdir -p "${RUNTIME_FILES_DIR}"
cp "${GCP_CREDENTIALS_FILE}" "${RUNTIME_FILES_DIR}/gcp-credentials.json"
cat > "${DEPLOY_ENV_FILE}" <<EOF
GCP_PROJECT_ID=${GCP_PROJECT_ID}
GITHUB_ACTOR=${GITHUB_ACTOR}
GITHUB_REPOSITORY=${GITHUB_REPOSITORY}
GITHUB_TOKEN=${GITHUB_TOKEN}
EOF
dagger -m "${RUSH_DELIVERY_MODULE}" call workflow \
--git-sha="${GITHUB_SHA}" \
--event-name="${GITHUB_EVENT_NAME}" \
--force-targets-json="${FORCE_TARGETS_JSON:-[]}" \
--deploy-tag-prefix=deploy/prod \
--artifact-prefix=deploy-target \
--environment=prod \
--dry-run=false \
--deploy-env-file="${DEPLOY_ENV_FILE}" \
--toolchain-image-provider=github \
--rush-cache-provider=github \
--source-mode=git \
--source-repository-url="${SOURCE_REPOSITORY_URL}" \
--source-ref="${GITHUB_REF}" \
--source-auth-token-env=GITHUB_TOKEN \
--runtime-files="${RUNTIME_FILES_DIR}" \
--docker-socket=/var/run/docker.sock
Use Local Runs when you need to test changes that have not been pushed to the remote repository yet.
For all callable module inputs, see the Public Dagger API.