add 1767888000, inaugurate 2026 folder #20
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Latest ASMap file | |
| on: | |
| pull_request: | |
| paths: | |
| - '**/*.dat' | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Find lastest ASMap file by timestamp | |
| id: find_latest | |
| run: | | |
| set -euo pipefail | |
| # Find all *_asmap.dat except latest_asmap.dat, anywhere in the repo | |
| LATEST_FILE="$( | |
| find . -type f -name '*_asmap.dat' ! -name 'latest_asmap.dat' -print0 \ | |
| | xargs -0 -I{} basename "{}" \ | |
| | sort -r \ | |
| | head -n 1 | |
| )" | |
| if [ -z "${LATEST_FILE}" ]; then | |
| echo "Error: No timestamped *_asmap.dat files found (excluding latest_asmap.dat)." | |
| exit 1 | |
| fi | |
| # Resolve the path of that file | |
| LATEST_PATH="$(find . -type f -name "${LATEST_FILE}" ! -name 'latest_asmap.dat' | head -n 1)" | |
| if [ -z "${LATEST_PATH}" ]; then | |
| echo "Error: Could not resolve path for latest file '${LATEST_FILE}'." | |
| exit 1 | |
| fi | |
| echo "LATEST_FILE=${LATEST_PATH#./}" >> "$GITHUB_ENV" | |
| - name: Check latest_asmap.dat exists and matches the highest timestamped file | |
| run: | | |
| if [ ! -f "latest_asmap.dat" ]; then | |
| echo "Error: latest_asmap.dat file is missing." | |
| exit 1 | |
| fi | |
| if [ -z "${LATEST_FILE:-}" ]; then | |
| echo "Error: LATEST_FILE env var is empty (find_latest step failed)." | |
| exit 1 | |
| fi | |
| if [ ! -f "$LATEST_FILE" ]; then | |
| echo "Error: Resolved latest timestamped file does not exist: $LATEST_FILE" | |
| exit 1 | |
| fi | |
| if ! cmp -s "$LATEST_FILE" "latest_asmap.dat"; then | |
| echo "Error: latest_asmap.dat does not match the content of $LATEST_FILE." | |
| exit 1 | |
| fi | |
| echo "Success" |