forked from diegoecab/oci-deal-accelerator
Compare commits
1 Commits
automation
...
automation
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f95c4c3dc8 |
@@ -61,9 +61,8 @@ jobs:
|
||||
run: |
|
||||
python3 tools/refresh_sku_catalog.py --discover -v 2>&1 \
|
||||
| tee /tmp/discover.log
|
||||
NEW_COUNT=$(sed -n 's/^DISCOVER_MISSING_COUNT=\([0-9]\+\)$/\1/p' \
|
||||
/tmp/discover.log | tail -1)
|
||||
echo "Parsed new_count='${NEW_COUNT}'"
|
||||
NEW_COUNT=$(grep -oE '^[0-9]+ SKUs present in API' /tmp/discover.log \
|
||||
| head -1 | awk '{print $1}' || echo "0")
|
||||
echo "new_count=${NEW_COUNT:-0}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload logs as artifact
|
||||
@@ -84,7 +83,7 @@ jobs:
|
||||
GITEA_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
DATE=$(date -u +%Y-%m-%d)
|
||||
BRANCH="automation/sku-refresh-${DATE}-run${{ github.run_number }}"
|
||||
BRANCH="automation/sku-refresh-${DATE}"
|
||||
|
||||
git config user.name "sku-refresh-bot"
|
||||
git config user.email "sku-refresh@automation.local"
|
||||
|
||||
@@ -385,8 +385,6 @@ def discover_catalog(verbose=False):
|
||||
|
||||
missing = discover_missing_skus(api_map, sku_map, verbose=verbose)
|
||||
print_missing_skus(missing, limit=None if verbose else 40)
|
||||
# Machine-readable summary for CI/automation — always last line on stdout.
|
||||
print("\nDISCOVER_MISSING_COUNT={}".format(len(missing)))
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user