Skip to content

Commit 64d5b2b

Browse files
committed
feature: use unl.json for root filename
1 parent 1762d62 commit 64d5b2b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/activate-unl.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
gsutil cp gs://xrplf-unl/unl/next.json .
3131
LAST_TS=$(gsutil stat gs://xrplf-unl/unl/next.json | grep 'timestamp' | cut -d':' -f2- | xargs)
3232
33-
# update the main root index (called index.html but content type is application/json)
33+
# update the main root unl.json
3434
gsutil -h "Cache-Control:public, max-age=30, stale-while-revalidate=86400, stale-if-error=604800" \
3535
-h "Content-Type:application/json" \
3636
-h "x-goog-meta-timestamp:${LAST_TS}" \
37-
cp next.json gs://xrplf-unl/index.html
37+
cp next.json gs://xrplf-unl/unl.json

.github/workflows/create-unl.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Create UNL Json
1+
name: Create UNL
22

33
on:
44
push:
5-
branches: [mankins/automate]
6-
# paths:
7-
# - "data/unl-raw.yaml"
5+
branches: [main]
6+
paths:
7+
- "data/unl-raw.yaml"
88
workflow_dispatch:
99
inputs:
1010
dry_run:
@@ -21,6 +21,7 @@ jobs:
2121
build:
2222
name: Build UNL
2323
runs-on: ubuntu-latest
24+
if: ${{ github.event_name == 'push' }}
2425
env:
2526
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
2627
XRPL_CLI_SECRET_BACKEND: ${{ secrets.XRPL_CLI_SECRET_BACKEND }}
@@ -47,9 +48,9 @@ jobs:
4748
run: |
4849
TS=$(date -u +"%Y%m%d%H%M")
4950
if date -d "+4 months" >/dev/null 2>&1; then
50-
EXP=$(date -d "+4 months" +"%Y-%m-%d")
51+
EXP=$(date -u -d "+4 months" +"%Y-%m-%dT%H:%M:%SZ")
5152
else
52-
EXP=$(date -v+4m +"%Y-%m-%d")
53+
EXP=$(date -u -v+4m +"%Y-%m-%dT%H:%M:%SZ")
5354
fi
5455
echo "ts=$TS" >> $GITHUB_OUTPUT
5556
echo "exp=$EXP" >> $GITHUB_OUTPUT
@@ -85,6 +86,7 @@ jobs:
8586
cp "unl-${{ steps.meta.outputs.ts }}.json" gs://xrplf-unl/unl/unl-${{ steps.meta.outputs.ts }}.json
8687
8788
- name: Set the next pointer
89+
if: ${{ github.event.inputs.dry_run != 'true' && steps.meta.outputs.ts != '' }}
8890
run: |
8991
gsutil -o GSUtil:parallel_composite_upload_threshold=10M \
9092
-h "Cache-Control:public, max-age=0" \

0 commit comments

Comments
 (0)