From ce9c9f1bf5e73fd8adbb450f0adaead81354ef41 Mon Sep 17 00:00:00 2001 From: KeisukeYamashita <19yamashita15@gmail.com> Date: Wed, 18 Dec 2024 21:35:11 +0100 Subject: [PATCH] ci: remove Cesium Ion access token cron updator (#1320) Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com> --- .../workflows/_upload_cesium_token_txt.yml | 35 ------------------- .../update_cesium_ion_token_nightly.yml | 14 -------- 2 files changed, 49 deletions(-) delete mode 100644 .github/workflows/_upload_cesium_token_txt.yml delete mode 100644 .github/workflows/update_cesium_ion_token_nightly.yml diff --git a/.github/workflows/_upload_cesium_token_txt.yml b/.github/workflows/_upload_cesium_token_txt.yml deleted file mode 100644 index dcc12154dc..0000000000 --- a/.github/workflows/_upload_cesium_token_txt.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Upload Cesium Ion token -on: - workflow_call: - inputs: - gcs_dst: - type: string - required: true - secrets: - credentials_json: - required: true -jobs: - upload: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - packages: write - steps: - - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.credentials_json }} - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v2 - - name: Upload Ion token - id: ion_token - run: | - cesium_ion_token_txt_path="/tmp/cesium_ion_token.txt" - curl https://raw.githubusercontent.com/CesiumGS/cesium/main/packages/engine/Source/Core/Ion.js > /tmp/Ion.js - cat /tmp/Ion.js | node -e "console.log(require('fs').readFileSync(process.stdin.fd).toString().match(/const defaultAccessToken =(\n| ).*\"(.*)\";/)[2])" | tr -d '\n' >> ${cesium_ion_token_txt_path} - token_length=$(cat ${cesium_ion_token_txt_path} | wc -c) - if [ $token_length -ne 177 ]; then - echo "Token length is invalid. TokenLength: ${token_length}" - exit 1 - fi - gsutil cp ${cesium_ion_token_txt_path} ${{ inputs.gcs_dst }}/cesium_ion_token.txt \ No newline at end of file diff --git a/.github/workflows/update_cesium_ion_token_nightly.yml b/.github/workflows/update_cesium_ion_token_nightly.yml deleted file mode 100644 index 8699ca4e82..0000000000 --- a/.github/workflows/update_cesium_ion_token_nightly.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Update Cesium Ion token Nightly - -# Every 2nd day of the month at 02:00 JST. -on: - workflow_dispatch: - schedule: - - cron: '0 17 1 * *' -jobs: - upload: - uses: ./.github/workflows/_upload_cesium_token_txt.yml - with: - gcs_dst: gs://reearth-visualizer-oss-static-bucket - secrets: - credentials_json: ${{ secrets.GCP_SA_KEY }}