Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Sep 7, 2024
1 parent 749ccaa commit f32e96c
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Process codebase to run in CI
run: |
find . -name "docker-compose.yml" -print0 | xargs -0 -I {} sh -c "sed -i -e '/###/d' {} && sed -i -e 's/##//' {}"
mkdir -p /tmp/workspace/code
- name: Process the codebase to run in CI
run: find . -name "docker-compose.yml" -print0 | xargs -0 -I {} sh -c "sed -i -e '/###/d' {} && sed -i -e 's/##//' {}"

- name: Create cache keys files for database caching
run: |
Expand All @@ -68,9 +66,6 @@ jobs:
echo "yes" | tee db_cache_fallback_yes
echo "$(date "${VORTEX_CI_DB_CACHE_TIMESTAMP}")" | tee db_cache_timestamp
- name: Show cache key for database caching
run: echo 'v24.8.0-db10-${{ hashFiles('db_cache_branch') }}-${{ hashFiles('db_cache_fallback') }}-${{ hashFiles('db_cache_timestamp') }}'

# Restore DB cache based on the cache strategy set by the cache keys below.
# Change 'v1' to 'v2', 'v3' etc., commit and push to force cache reset.
# Lookup cache based on the default branch and a timestamp. Allows
Expand All @@ -88,12 +83,9 @@ jobs:
- name: Download DB
run: |
VORTEX_DB_DOWNLOAD_SEMAPHORE=/tmp/download-db-success ./scripts/vortex/download-db.sh
echo "db_hash=${{ hashFiles('.data') }}" >> "$GITHUB_ENV"
timeout-minutes: 30

- name: Calculate the database file hash
id: db-hash
run: echo "before=${{ hashFiles('.data') }}" >> "$GITHUB_ENV"

# - name: Export DB
# run: |
# [ ! -f /tmp/download-db-success ] && echo "==> Database download semaphore file is missing. DB export will not proceed." && exit 0
Expand All @@ -112,7 +104,7 @@ jobs:
# to save cache even if the fallback is not used when restoring it.
- name: Save DB cache
uses: actions/cache/save@v4
if: env.before != hashFiles('.data')
if: env.db_hash != hashFiles('.data')
with:
path: .data
key: v24.8.0-db10-${{ hashFiles('db_cache_branch') }}-${{ hashFiles('db_cache_fallback_yes') }}-${{ hashFiles('db_cache_timestamp') }}
Expand Down

0 comments on commit f32e96c

Please sign in to comment.