2525 GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
2626 XRPL_CLI_SECRET_BACKEND : ${{ secrets.XRPL_CLI_SECRET_BACKEND }}
2727 steps :
28- # - name: Debug GitHub context
29- # run: |
30- # echo "GITHUB_REF: $GITHUB_REF"
31- # echo "GITHUB_EVENT_NAME: $GITHUB_EVENT_NAME"
32- # echo "GITHUB_WORKFLOW_REF: $GITHUB_WORKFLOW_REF"
33- # echo "Repository: ${{ github.repository }}"
34- # echo "Actor: ${{ github.actor }}"
35- # echo "Ref: ${{ github.ref }}"
36-
3728 - name : Checkout repo
3829 uses : actions/checkout@v4
3930 with :
@@ -45,58 +36,12 @@ jobs:
4536 name : Authenticate with GCP
4637 uses : google-github-actions/auth@v2
4738 with :
48- # workload_identity_provider: projects/815786927258/locations/global/workloadIdentityPools/github-pool/providers/github-provider
4939 project_id : xrplf-infra-shared
5040 credentials_json : ${{ secrets.GCP_SA_KEY }}
51- # project_id: ${{ secrets.GCP_PROJECT_ID }}
52- # service_account: github-oidc-unl@xrplf-infra-shared.iam.gserviceaccount.com
53- # export_environment_variables: true
54- # create_credentials_file: true
55- # access_token_lifetime: "120s"
56- # token_format: "access_token"
5741
5842 - name : Set up Cloud SDK
5943 uses : google-github-actions/setup-gcloud@v2
6044
61- # - name: Verify via ADC
62- # run: |
63- # # Should print a valid token (no 403)
64- # echo "::add-mask::$(gcloud auth application-default print-access-token)"
65-
66- # # Also prove we can talk to the API
67- # gcloud projects describe "${{ env.GCP_PROJECT_ID }}" --format="value(projectId)"
68-
69- # - name: Verify identity
70- # run: |
71- # echo "OIDC → GCP token:"
72- # echo "${{ steps.auth.outputs.auth_token }}"
73- # curl -H "Authorization: Bearer ${{ steps.auth.outputs.auth_token }}" \
74- # https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}:generateAccessToken \
75- # -H "Content-Type: application/json" \
76- # -d '{"scope":["https://www.googleapis.com/auth/cloud-platform"]}' | jq
77-
78- # - name: Show active account
79- # run: |
80- # TOKEN=$(gcloud auth print-access-token)
81- # echo "::add-mask::$TOKEN"
82- # gcloud auth list --filter="status:ACTIVE" --format="value(account)"
83- # gcloud config list project --format="value(core.project)"
84-
85- # - name: Show active GCP identity
86- # run: |
87- # gcloud auth list
88- # gcloud auth list --key-file="$GOOGLE_APPLICATION_CREDENTIALS"
89- # gcloud config list
90-
91- # - name: Fetch validator keys secret
92- # id: get-secret
93- # run: |
94- # SECRET=$(gcloud secrets versions access latest --secret="unl_validator_keys" --project="${{ env.GCP_PROJECT_ID }}")
95- # echo "UNL_VALIDATOR_KEYS<<EOF" >> $GITHUB_ENV
96- # echo "$SECRET" >> $GITHUB_ENV
97- # echo "EOF" >> $GITHUB_ENV
98- # echo "::add-mask::$UNL_VALIDATOR_KEYS"
99-
10045 - name : Generate expiration and timestamp
10146 id : meta
10247 run : |
@@ -138,3 +83,10 @@ jobs:
13883 gsutil -h "Cache-Control:public, max-age=30, stale-while-revalidate=86400, stale-if-error=604800" \
13984 -h "Content-Type:application/json" \
14085 cp "unl-${{ steps.meta.outputs.ts }}.json" gs://xrplf-unl/unl/unl-${{ steps.meta.outputs.ts }}.json
86+
87+ - name : Set the next pointer
88+ run : |
89+ gsutil -h "Cache-Control:public, max-age=0" \
90+ -h "Content-Type:application/json" \
91+ -h "x-goog-meta-timestamp:${{ steps.meta.outputs.ts }}" \
92+ cp "unl-${{ steps.meta.outputs.ts }}.json" gs://xrplf-unl/unl/next.json
0 commit comments