Skip to content

Commit 994dacf

Browse files
authored
fixup security bump script (servo#713)
Some fixups for servo#711 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
1 parent e083d7d commit 994dacf

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/security-bump.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ jobs:
2020
with:
2121
python-version: "3.13"
2222
- run: pip install requests
23+
- run: |
24+
git config user.name 'servo-bot'
25+
git config user.email 'ghbot+mozjs-sm-bump@servo.org'
2326
- run: python3 ./mozjs-sys/etc/sm-security-bump.py
27+
id: bump
2428
- name: Create Pull Request
2529
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
30+
with:
31+
title: Security bump SpiderMonkey to ${{ steps.bump.outputs.version }}
32+
body: |
33+
Bump SpiderMonkey to ${{ steps.bump.outputs.version }} (changeset: [${{ steps.bump.outputs.changeset }}](https://github.com/servo/mozjs/releases/download/mozjs-source-${{ steps.bump.outputs.changeset }}))
34+
branch-token: ${{ secrets.SERVO_BOT }}
35+
token: ${{ secrets.PR_TOKEN }}
36+
push-to-fork: servo-bot/mozjs
37+
author: servo-bot <ghbot+mozjs-sm-bump@servo.org>
38+
branch: security-bump-esr${{ steps.bump.outputs.esr }}

mozjs-sys/etc/sm-security-bump.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
except subprocess.CalledProcessError:
2525
pass
2626

27+
if GITHUB_OUTPUT := os.getenv("GITHUB_OUTPUT"):
28+
with open(GITHUB_OUTPUT, "a") as github_output_file:
29+
print(f"tag={tag}", file=github_output_file)
30+
print(f"changeset={changeset}", file=github_output_file)
31+
print(f"version={ESR}.{int(minor_patch)}", file=github_output_file)
32+
print(f"esr={ESR}", file=github_output_file)
33+
34+
2735
download_from_taskcluster(changeset)
2836

2937
subprocess.check_call(
@@ -39,6 +47,7 @@
3947
"servo/mozjs",
4048
"--title",
4149
f"SpiderMonkey {tag}",
50+
"--latest=false",
4251
"--notes",
4352
f"Source code for SpiderMonkey {tag} (changeset: [{changeset}](https://hg.mozilla.org/releases/{REPO}/rev/{changeset}))",
4453
]

0 commit comments

Comments
 (0)