IGNORE_RUN_CACHE

This commit is contained in:
Elio Bischof
2025-06-27 07:08:58 +02:00
parent 5c1a2aee81
commit c096197cf1
3 changed files with 10 additions and 10 deletions

View File

@@ -3,8 +3,8 @@ on:
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
force: ignore-run-cache:
description: 'Whether to ignore the run caches' description: 'Whether to ignore the run cache'
required: false required: false
default: true default: true
ref-tag: ref-tag:
@@ -57,7 +57,7 @@ jobs:
${{ runner.os }}-login-run-caches- ${{ runner.os }}-login-run-caches-
- run: make login_quality - run: make login_quality
env: env:
FORCE: ${{ github.event.inputs.force == 'true' }} IGNORE_RUN_CACHE: ${{ github.event.inputs.ignore-run-cache == 'true' }}
DOCKER_METADATA_OUTPUT_VERSION: ${{ github.event.inputs.ref-tag || env.DOCKER_METADATA_OUTPUT_VERSION || steps.meta.outputs.version }} DOCKER_METADATA_OUTPUT_VERSION: ${{ github.event.inputs.ref-tag || env.DOCKER_METADATA_OUTPUT_VERSION || steps.meta.outputs.version }}
- name: Save Run Caches - name: Save Run Caches
uses: actions/cache/save@v4 uses: actions/cache/save@v4

View File

@@ -35,10 +35,10 @@ login_help:
@echo " login_help - Show this help message." @echo " login_help - Show this help message."
@echo " login_quality - Run all quality checks (login_lint, login_test_unit, login_test_integration, login_test_acceptance)." @echo " login_quality - Run all quality checks (login_lint, login_test_unit, login_test_integration, login_test_acceptance)."
@echo " login_standalone_build - Build the docker image for production login containers." @echo " login_standalone_build - Build the docker image for production login containers."
@echo " login_lint - Run linting and formatting checks. FORCE=true prevents skipping." @echo " login_lint - Run linting and formatting checks. IGNORE_RUN_CACHE=true prevents skipping."
@echo " login_test_unit - Run unit tests. Tests without any dependencies. FORCE=true prevents skipping." @echo " login_test_unit - Run unit tests. Tests without any dependencies. IGNORE_RUN_CACHE=true prevents skipping."
@echo " login-test_integration - Run integration tests. Tests a login production build against a mocked Zitadel core API. FORCE=true prevents skipping." @echo " login-test_integration - Run integration tests. Tests a login production build against a mocked Zitadel core API. IGNORE_RUN_CACHE=true prevents skipping."
@echo " login_test_acceptance - Run acceptance tests. Tests a login production build with a local Zitadel instance behind a reverse proxy. FORCE=true prevents skipping." @echo " login_test_acceptance - Run acceptance tests. Tests a login production build with a local Zitadel instance behind a reverse proxy. IGNORE_RUN_CACHE=true prevents skipping."
@echo " typescript_generate - Generate TypeScript client code from Protobuf definitions." @echo " typescript_generate - Generate TypeScript client code from Protobuf definitions."
@echo " show_run_caches - Show all run caches with image ids and exit codes." @echo " show_run_caches - Show all run caches with image ids and exit codes."
@echo " clean_run_caches - Remove all run caches." @echo " clean_run_caches - Remove all run caches."

View File

@@ -12,7 +12,7 @@ fi
MAKE_TARGET=$1 MAKE_TARGET=$1
IMAGES=$2 IMAGES=$2
FORCE=${FORCE:-false} IGNORE_RUN_CACHE=${IGNORE_RUN_CACHE:-false}
CACHE_FILE="$CACHE_DIR/$MAKE_TARGET.digests" CACHE_FILE="$CACHE_DIR/$MAKE_TARGET.digests"
mkdir -p "$CACHE_DIR" mkdir -p "$CACHE_DIR"
@@ -41,8 +41,8 @@ CACHED_STATUS=$(echo "$CACHE_FILE_CONTENT" | cut -d ';' -f1)
CACHED_IMAGE_CREATED_VALUES=$(echo "$CACHE_FILE_CONTENT" | cut -d ';' -f2-99) CACHED_IMAGE_CREATED_VALUES=$(echo "$CACHE_FILE_CONTENT" | cut -d ';' -f2-99)
CURRENT_IMAGE_CREATED_VALUES="$(get_image_creation_dates)" CURRENT_IMAGE_CREATED_VALUES="$(get_image_creation_dates)"
if [[ "$CACHED_IMAGE_CREATED_VALUES" == "$CURRENT_IMAGE_CREATED_VALUES" ]]; then if [[ "$CACHED_IMAGE_CREATED_VALUES" == "$CURRENT_IMAGE_CREATED_VALUES" ]]; then
if [[ "$FORCE" == "true" ]]; then if [[ "$IGNORE_RUN_CACHE" == "true" ]]; then
echo "\$FORCE=$FORCE - Running $MAKE_TARGET despite unchanged images." echo "\$IGNORE_RUN_CACHE=$IGNORE_RUN_CACHE - Running $MAKE_TARGET despite unchanged images."
else else
echo "Skipping $MAKE_TARGET all images unchanged, returning cached status $CACHED_STATUS" echo "Skipping $MAKE_TARGET all images unchanged, returning cached status $CACHED_STATUS"
exit $CACHED_STATUS exit $CACHED_STATUS