Skip to content

chore: pin GitHub Actions workflows to full commit SHAs - #407

Merged
bmtcril merged 1 commit into
openedx:masterfrom
irfanuddinahmad:pin-actions-to-sha
May 19, 2026
Merged

bmtcril merged 1 commit into
openedx:masterfrom
irfanuddinahmad:pin-actions-to-sha

Conversation

@irfanuddinahmad

Copy link
Copy Markdown
Contributor

Pins all uses: action refs to their full commit SHA with the version tag preserved as a comment. Part of org-wide SHA-pinning migration: openedx/.github#165

@bmtcril
bmtcril merged commit 62460c8 into openedx:master May 19, 2026
3 checks passed
bmtcril pushed a commit that referenced this pull request Sep 2, 2026
…ormance

release.yml (added in #425, touched again in #434/#435/#436/#438) had
drifted from the org's gold-standard reference (sample-plugin's
release.yml): python-semantic-release, actions/upload-artifact and
actions/download-artifact were on floating version tags (@v10.6.2, @v7,
@v8) instead of pinned commit SHAs, defeating the whole point of the
pin-actions-to-sha effort (this repo's own #407) for the one workflow
that runs unreviewed on every push to master.

Also:
- Drop `fetch-depth: 0` from the release job's checkout: python-semantic-
  release auto-deepens a shallow clone itself before evaluating version
  history, so it's never needed here (confirmed against sample-plugin).
- Add `if-no-files-found: error` to the dist upload step so a build that
  silently produces no artifacts fails loudly instead of shipping an
  empty release.
- Add the `github.ref_name == 'master'` guard to publish_to_pypi's `if:`,
  matching sample-plugin, even though this workflow currently only
  triggers on push to master.

All three added SHAs were independently verified against the upstream
repos via `gh api repos/<owner>/<repo>/commits/<sha>` and cross-checked
against their claimed tags (resolving through the annotated tag object
for python-semantic-release@v10.6.2, which points at commit
9a026e9303981c866c3425723009becb2437c757).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants