Commit 56b09b1
workflows: swap softprops for gh CLI, add CloudFront reachability check, remove --acl (#18)
* workflows: swap softprops for gh CLI, add CloudFront reachability check, remove --acl
Three follow-up corrections to PR #17:
1. Remove `--acl public-read` from `aws s3 cp`.
The bucket has `disable_confusing_acls = true` (BucketOwnerEnforced), which
disables ACLs entirely. `BlockPublicAcls` + `IgnorePublicAcls` provide
additional coverage. The ACL flag is silently ignored. The IAM role
(`S3_ACCESS_MODE.PUT`) also doesn't grant `PutObjectAcl`. Reads go via
CloudFront OAC, not public-S3.
2. Replace `softprops/action-gh-release` with GitHub's first-party `gh` CLI.
`gh release upload` is pre-installed on GitHub-hosted runners, removes a
third-party (single-maintainer) supply-chain dependency, and behaves
equivalently with `--clobber`.
3. Add a post-upload CloudFront reachability check (`curl -fI`).
If the CloudFront path_patterns allowlist doesn't include the key's prefix,
Mac Bazel builds will silently 403. Failing the workflow here surfaces the
issue before consumers hit it.
S3 path stays `node-gyp/*` (this PR no longer changes it — see codez PR #390222
which adds `node-gyp/*` to CloudFront's path_patterns in system_packages.tf).
Action pinning: tag-pinned per codez convention (100% of codez workflows use
tags, not SHAs).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Update .github/workflows/build-node-packages.yml
Co-authored-by: Eli Skeggs <1348991+skeggse@users.noreply.github.com>
* workflows: hoist matrix values to job-level env, drop expression substitution in run: blocks
Eli's review flagged `${{ matrix.arch }}` in a run: block as an injectable
pattern even though the matrix values are hardcoded and not truly exploitable.
Apply the pattern consistently across the whole workflow:
- Hoist PLATFORM, ARCH, BAZEL_ARCH, REPO to job-level env so each step can
reference them as shell variables ($ARCH etc.) rather than GitHub Actions
expressions (${{ matrix.arch }}). Job-level env evaluates matrix context
since the job is instantiated per matrix combination, so this DRYs up the
per-step env blocks.
- Rewrite every `run:` block to reference the job-level env vars. No more
`${{ ... }}` expressions inside shell scripts.
- Secret references (GITHUB_TOKEN) remain step-scoped per least-privilege.
- Minor cleanup: collapse three separate `echo ... >> $GITHUB_ENV` lines into
a single `{ ...; } >> "$GITHUB_ENV"` block.
Addresses Eli's inline comment on line 114 of the pre-hoist file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Harshita Gupta <harshita-gupta@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Eli Skeggs <1348991+skeggse@users.noreply.github.com>1 parent 104256b commit 56b09b1
2 files changed
Lines changed: 64 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
41 | | - | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | | - | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
| |||
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
97 | | - | |
98 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
99 | 116 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
103 | 143 | | |
104 | 144 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments