Trying to make the main cicd depend on/wait on the base image build.
Some checks failed
CICD Base Image / Registry Push Preflight (pull_request) Successful in 13s
CICD Base Image / Build and Publish CICD Base Image (pull_request) Failing after 21s
Tests / Detect Change Scope (pull_request) Successful in 5m51s
Tests / Registry Push Preflight (pull_request) Has been skipped
Tests / Prepare CICD Base Reference (pull_request) Has been skipped
Tests / Build and Push CICD Complete Image (pull_request) Has been skipped
Tests / Trailing Whitespace Check (pull_request) Has been skipped
Tests / TOML Formatting Check (pull_request) Has been skipped
Tests / End of File Check (pull_request) Has been skipped
Tests / YAML Syntax Check (pull_request) Has been skipped
Tests / Ruff Linting (pull_request) Has been skipped
Tests / TOML Syntax Check (pull_request) Has been skipped
Tests / Ruff Format Check (pull_request) Has been skipped
Tests / Mixed Line Ending Check (pull_request) Has been skipped
Tests / Pyright Type Check (pull_request) Has been skipped
Tests / Backend Doctests (pull_request) Has been skipped
Tests / No Docstring Types Check (pull_request) Has been skipped
Tests / Darglint Docstring Check (pull_request) Has been skipped
Tests / ESLint Check (pull_request) Has been skipped
Tests / Prettier Format Check (pull_request) Has been skipped
Tests / TypeScript Type Check (pull_request) Has been skipped
Tests / TSDoc Lint Check (pull_request) Has been skipped
Tests / Backend Tests (pull_request) Has been skipped
Tests / Frontend Tests (pull_request) Has been skipped
Tests / Integration Tests (pull_request) Has been skipped
Tests / End-to-End Tests (pull_request) Has been skipped
Some checks failed
CICD Base Image / Registry Push Preflight (pull_request) Successful in 13s
CICD Base Image / Build and Publish CICD Base Image (pull_request) Failing after 21s
Tests / Detect Change Scope (pull_request) Successful in 5m51s
Tests / Registry Push Preflight (pull_request) Has been skipped
Tests / Prepare CICD Base Reference (pull_request) Has been skipped
Tests / Build and Push CICD Complete Image (pull_request) Has been skipped
Tests / Trailing Whitespace Check (pull_request) Has been skipped
Tests / TOML Formatting Check (pull_request) Has been skipped
Tests / End of File Check (pull_request) Has been skipped
Tests / YAML Syntax Check (pull_request) Has been skipped
Tests / Ruff Linting (pull_request) Has been skipped
Tests / TOML Syntax Check (pull_request) Has been skipped
Tests / Ruff Format Check (pull_request) Has been skipped
Tests / Mixed Line Ending Check (pull_request) Has been skipped
Tests / Pyright Type Check (pull_request) Has been skipped
Tests / Backend Doctests (pull_request) Has been skipped
Tests / No Docstring Types Check (pull_request) Has been skipped
Tests / Darglint Docstring Check (pull_request) Has been skipped
Tests / ESLint Check (pull_request) Has been skipped
Tests / Prettier Format Check (pull_request) Has been skipped
Tests / TypeScript Type Check (pull_request) Has been skipped
Tests / TSDoc Lint Check (pull_request) Has been skipped
Tests / Backend Tests (pull_request) Has been skipped
Tests / Frontend Tests (pull_request) Has been skipped
Tests / Integration Tests (pull_request) Has been skipped
Tests / End-to-End Tests (pull_request) Has been skipped
Signed-off-by: copilotcoder <copilotcoder@darkhelm.org>
This commit is contained in:
@@ -6,6 +6,9 @@ on:
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: [ "CICD Base Image" ]
|
||||
types: [ completed ]
|
||||
|
||||
concurrency:
|
||||
group: cicd-${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -34,8 +37,9 @@ jobs:
|
||||
id: detect
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
WORKFLOW_RUN_CONCLUSION: ${{ github.event.workflow_run.conclusion }}
|
||||
BEFORE_SHA: ${{ github.event.before }}
|
||||
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
run: |
|
||||
@@ -43,6 +47,19 @@ jobs:
|
||||
umask 077
|
||||
trap 'rm -f ~/.ssh/id_rsa' EXIT
|
||||
|
||||
if [ "${EVENT_NAME}" = "workflow_run" ]; then
|
||||
if [ "${WORKFLOW_RUN_CONCLUSION}" = "success" ]; then
|
||||
echo "run_ci=true" >> "$GITHUB_OUTPUT"
|
||||
echo "run_backend=true" >> "$GITHUB_OUTPUT"
|
||||
echo "run_frontend=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "run_ci=false" >> "$GITHUB_OUTPUT"
|
||||
echo "run_backend=false" >> "$GITHUB_OUTPUT"
|
||||
echo "run_frontend=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${EVENT_NAME}" = "workflow_dispatch" ]; then
|
||||
echo "run_ci=true" >> "$GITHUB_OUTPUT"
|
||||
echo "run_backend=true" >> "$GITHUB_OUTPUT"
|
||||
@@ -97,6 +114,14 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if printf '%s\n' "${NON_DOC_FILES}" | grep -Eq '^(Dockerfile\.cicd-base|\.dockerignore|scripts/compute-cicd-base-hash\.sh|\.gitea/workflows/cicd-base\.yml)$'; then
|
||||
echo "⏭ Base inputs changed; waiting for successful CICD Base Image workflow completion before running main CI."
|
||||
echo "run_ci=false" >> "$GITHUB_OUTPUT"
|
||||
echo "run_backend=false" >> "$GITHUB_OUTPUT"
|
||||
echo "run_frontend=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
only_backend=true
|
||||
only_frontend=true
|
||||
|
||||
@@ -260,7 +285,7 @@ jobs:
|
||||
- name: Minimal checkout for base hash inputs
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
|
||||
run: |
|
||||
umask 077
|
||||
trap 'rm -f ~/.ssh/id_rsa' EXIT
|
||||
@@ -330,7 +355,7 @@ jobs:
|
||||
- name: Minimal checkout for Dockerfile
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
|
||||
run: |
|
||||
umask 077
|
||||
trap 'rm -f ~/.ssh/id_rsa' EXIT
|
||||
@@ -377,7 +402,7 @@ jobs:
|
||||
env:
|
||||
PACKAGE_ACCESS_TOKEN: ${{ secrets.PACKAGE_ACCESS_TOKEN }}
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
GITHUB_SHA: ${{ github.event.workflow_run.head_sha || github.sha }}
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER || github.actor }}
|
||||
BASE_IMAGE: ${{ needs.prepare-base-ref.outputs.base_image }}
|
||||
run: |
|
||||
@@ -394,7 +419,7 @@ jobs:
|
||||
|
||||
echo "Waiting for immutable base image: ${BASE_IMAGE}"
|
||||
|
||||
max_attempts=40
|
||||
max_attempts=220
|
||||
sleep_seconds=30
|
||||
|
||||
for i in $(seq 1 "${max_attempts}"); do
|
||||
|
||||
Reference in New Issue
Block a user