Skip to content

[GHA] Upload installer README to S3 when modified#4028

Merged
imnasnainaec merged 6 commits intomasterfrom
copilot/update-installer-readme-upload
Nov 19, 2025
Merged

[GHA] Upload installer README to S3 when modified#4028
imnasnainaec merged 6 commits intomasterfrom
copilot/update-installer-readme-upload

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Upload installer README to AWS S3 when modified

Summary

This PR updates the .github/workflows/installer.yml workflow to automatically upload installer/README.pdf to s3://software.thecombine.app when installer/README.md changes on push to master.

Changes Made

  • Added robust git diff check to detect changes to installer/README.md
    • Handles push events using github.event.before
    • Handles pull requests by comparing against base branch
    • Handles edge cases (initial commits, missing refs)
  • Added AWS credentials configuration step (conditional on README change and push event)
  • Added S3 upload step to upload README.pdf to s3://software.thecombine.app with proper content-type
  • Updated harden-runner allowed endpoints to include S3 and STS endpoints
  • Set fetch-depth: 2 for minimal history needed to compare changes

Implementation Details

The change detection logic handles multiple scenarios:

- name: Detect changes to installer README
  id: changed-files
  run: |
    # For pushes, use the before commit from the event; fallback to HEAD~1
    # For PRs, compare against the base branch
    if [ "${{ github.event_name }}" = "pull_request" ]; then
      COMPARE_REF="origin/${{ github.base_ref }}"
    else
      COMPARE_REF="${{ github.event.before }}"
      if [ -z "$COMPARE_REF" ] || [ "$COMPARE_REF" = "0000000000000000000000000000000000000000" ]; then
        COMPARE_REF="HEAD~1"
      fi
    fi
    if git diff --name-only "$COMPARE_REF" HEAD 2>/dev/null | grep -q "^installer/README.md$"; then
      echo "changed=true" >> $GITHUB_OUTPUT
    else
      echo "changed=false" >> $GITHUB_OUTPUT
    fi

The upload steps only run when:

  1. The event is a push (not a pull request)
  2. The installer/README.md file has been modified

Security Summary

No security vulnerabilities detected by CodeQL analysis.

Fixes #4025


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


This change is Reviewable

Copilot AI and others added 2 commits November 17, 2025 22:42
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow to upload README to AWS on changes Upload installer README to S3 when modified Nov 17, 2025
Copilot AI requested a review from imnasnainaec November 17, 2025 22:46
@imnasnainaec imnasnainaec changed the title Upload installer README to S3 when modified [GHA] Upload installer README to S3 when modified Nov 17, 2025
Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
Copilot AI requested a review from imnasnainaec November 18, 2025 19:00
@github-actions github-actions bot added documentation Improvements or additions to documentation deployment github_actions Pull requests that update GitHub Actions code labels Nov 18, 2025
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.58%. Comparing base (f63122e) to head (cc714a1).
⚠️ Report is 33 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4028   +/-   ##
=======================================
  Coverage   74.58%   74.58%           
=======================================
  Files         293      293           
  Lines       10817    10817           
  Branches     1353     1353           
=======================================
  Hits         8068     8068           
  Misses       2354     2354           
  Partials      395      395           
Flag Coverage Δ
backend 85.45% <ø> (ø)
frontend 66.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@imnasnainaec imnasnainaec force-pushed the copilot/update-installer-readme-upload branch from b56ad1d to 1b16c76 Compare November 18, 2025 20:09
@imnasnainaec imnasnainaec force-pushed the copilot/update-installer-readme-upload branch from 1b16c76 to 1bc927d Compare November 18, 2025 20:16
@imnasnainaec imnasnainaec requested a review from Copilot November 18, 2025 20:18
Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imnasnainaec reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds automatic S3 upload functionality to the installer workflow to upload the installer README PDF to s3://software.thecombine.app when installer/README.md is modified on push to master. It also includes minor formatting improvements to the README text.

Key Changes

  • Added git-based file change detection to identify modifications to installer/README.md
  • Integrated conditional AWS credential configuration and S3 upload steps into the existing make_readme job
  • Updated harden-runner allowed endpoints to include S3 and STS services for AWS access

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/installer.yml Added file change detection step, AWS credentials configuration, and S3 upload logic with fetch-depth 2 for git diff support; updated harden-runner endpoints
installer/README.md Minor formatting improvements: rewrapped text for the Skype note and added a comma in the "Connecting to The Combine" section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@imnasnainaec

This comment was marked as resolved.

@imnasnainaec imnasnainaec force-pushed the copilot/update-installer-readme-upload branch from 25ec672 to 1bc927d Compare November 18, 2025 22:08
@imnasnainaec imnasnainaec marked this pull request as ready for review November 18, 2025 22:08
@jasonleenaylor
Copy link
Contributor

.github/workflows/installer.yml line 96 at r4 (raw file):

          fetch-depth: 2
      - name: Detect changes to installer README
        id: changed-files

an id of changed-readme adds clarity to the later usage.

Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imnasnainaec reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot)

@imnasnainaec imnasnainaec enabled auto-merge (squash) November 19, 2025 19:08
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@jasonleenaylor reviewed 1 of 2 files at r2, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot)

@imnasnainaec imnasnainaec merged commit f41a70f into master Nov 19, 2025
21 checks passed
@imnasnainaec imnasnainaec deleted the copilot/update-installer-readme-upload branch November 19, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GHA] Upload installer README when .md changed

3 participants