From 8ac8bd493675d040bf58b4655e8d3b86407f8b1f Mon Sep 17 00:00:00 2001 From: Evan Parker Date: Thu, 31 Jul 2025 09:58:43 -0600 Subject: [PATCH 1/4] Update push-to-s3 - move to public requester-pays bucket. This update changes the upload bucket for our s3 data with the rationale of (1) ending object expiration and (2) moving to _requester pays_. __Object Expiration:__ The old bucket had object expiration which caused problems with GitHub's behavior of disabling actions on repositories with limited activity. __Requester Pays:__ The new bucket is public to logged-in users (no anonymous access) and is configured with the _requester pays_ behavior so that egress charges are billed to the account originating the file egress than to the account that owns the bucket (our account). In practice we expect JCSDA to be responsible for the majority of egress traffic but if this changes we will not be responsible for high utilization billing. --- .github/workflows/push-to-s3.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-to-s3.yaml b/.github/workflows/push-to-s3.yaml index 262bc6e..471dfc0 100644 --- a/.github/workflows/push-to-s3.yaml +++ b/.github/workflows/push-to-s3.yaml @@ -9,6 +9,7 @@ on: schedule: # 1:30 AM on the 1st and 15th day of each month. - cron: 30 1 1,15 * * + workflow_dispatch: {} jobs: upload: @@ -33,7 +34,7 @@ jobs: - name: Create tarball and upload to s3 env: - LFS_BUCKET_AND_PATH: jcsda-usaf-ci-build-cache/lfs + LFS_BUCKET_AND_PATH: jcsda-public-rpays/JCSDA-internal run: | export repository_name=$(basename $(pwd)) echo "Prep repo ${repository_name} for upload" From 9504aa4f3bb4c61e07e8c820ccce30144a68b60b Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 1 Aug 2025 10:34:12 -0600 Subject: [PATCH 2/4] temporarily add pull request trigger --- .github/workflows/push-to-s3.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/push-to-s3.yaml b/.github/workflows/push-to-s3.yaml index 471dfc0..384ce3d 100644 --- a/.github/workflows/push-to-s3.yaml +++ b/.github/workflows/push-to-s3.yaml @@ -6,6 +6,9 @@ on: push: branches: - develop + pull_request: + branches: + - develop schedule: # 1:30 AM on the 1st and 15th day of each month. - cron: 30 1 1,15 * * From f0411cdd16d59160666b316a2faca9a3354bc3e6 Mon Sep 17 00:00:00 2001 From: Evan Parker Date: Fri, 1 Aug 2025 18:24:54 +0000 Subject: [PATCH 3/4] Detect org, so it works properly with public --- .github/workflows/push-to-s3.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-to-s3.yaml b/.github/workflows/push-to-s3.yaml index 384ce3d..357eebd 100644 --- a/.github/workflows/push-to-s3.yaml +++ b/.github/workflows/push-to-s3.yaml @@ -37,9 +37,13 @@ jobs: - name: Create tarball and upload to s3 env: - LFS_BUCKET_AND_PATH: jcsda-public-rpays/JCSDA-internal + LFS_BUCKET: jcsda-public-rpays run: | export repository_name=$(basename $(pwd)) + export org_name="${GITHUB_REPOSITORY_OWNER}" + export LFS_BUCKET_AND_PATH="${LFS_BUCKET}/${org_name}" + echo "Detected organization: ${org_name}" + echo "Using S3 path: ${LFS_BUCKET_AND_PATH}" echo "Prep repo ${repository_name} for upload" git fetch --all git checkout develop From 8290a2b054ea76c01ce34f638816836f480d5a52 Mon Sep 17 00:00:00 2001 From: Evan Parker Date: Fri, 1 Aug 2025 18:28:12 +0000 Subject: [PATCH 4/4] Remove pull_request trigger --- .github/workflows/push-to-s3.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push-to-s3.yaml b/.github/workflows/push-to-s3.yaml index 357eebd..99a0872 100644 --- a/.github/workflows/push-to-s3.yaml +++ b/.github/workflows/push-to-s3.yaml @@ -6,9 +6,6 @@ on: push: branches: - develop - pull_request: - branches: - - develop schedule: # 1:30 AM on the 1st and 15th day of each month. - cron: 30 1 1,15 * * @@ -43,8 +40,8 @@ jobs: export org_name="${GITHUB_REPOSITORY_OWNER}" export LFS_BUCKET_AND_PATH="${LFS_BUCKET}/${org_name}" echo "Detected organization: ${org_name}" - echo "Using S3 path: ${LFS_BUCKET_AND_PATH}" - echo "Prep repo ${repository_name} for upload" + echo "Uploading repository to s3://${LFS_BUCKET_AND_PATH}/${repository_name}.tar.gz" + echo "Preparing ${repository_name} for upload" git fetch --all git checkout develop git config --local --remove-section 'http.https://github.com/'