Skip to content

Commit f32af3e

Browse files
committed
Checkout action using action_ref
1 parent f4b2aa8 commit f32af3e

12 files changed

Lines changed: 109 additions & 125 deletions

.github/actions/setup-e2e-env/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ runs:
8989
- run: echo "Setup E2E Environment started"
9090
shell: bash
9191

92+
- name: Checkout GitHub tools repository
93+
uses: actions/checkout@v5
94+
with:
95+
repository: ${{ github.action_repository }}
96+
ref: ${{ github.action_ref }}
97+
path: ./.github-tools
98+
9299
## Android Setup (early for fail-fast) ##
93100

94101
# Set Android environment variables (self-hosted runner has SDK pre-installed)
@@ -101,7 +108,7 @@ runs:
101108

102109
- name: Configure Android Signing Certificates
103110
if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }}
104-
uses: MetaMask/github-tools/.github/actions/configure-keystore@0259e8a920318b02a8860e178d79796eaa08de02
111+
uses: ./.github-tools/.github/actions/configure-keystore
105112
with:
106113
aws-role-to-assume: ${{ inputs.keystore-role-to-assume }}
107114
aws-region: 'us-east-2'
@@ -178,7 +185,7 @@ runs:
178185

179186
- name: Configure iOS Signing Certificates
180187
if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }}
181-
uses: MetaMask/github-tools/.github/actions/configure-keystore@0259e8a920318b02a8860e178d79796eaa08de02
188+
uses: ./.github-tools/.github/actions/configure-keystore
182189
with:
183190
aws-role-to-assume: ${{ inputs.keystore-role-to-assume }}
184191
aws-region: 'us-east-2'

.github/scripts/create-platform-release-pr.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ create_release_pr() {
239239

240240
# Version Updates
241241
echo "Running version update scripts.."
242-
./github-tools/.github/scripts/set-semvar-version.sh "${new_version}" "${platform}"
242+
./.github-tools/.github/scripts/set-semvar-version.sh "${new_version}" "${platform}"
243243

244244
# Commit Changes
245245
local changed_files
@@ -273,42 +273,42 @@ create_release_pr() {
273273
# Prepare release PR body with team sign-off checklist
274274
local release_body="# 🚀 v${new_version} Testing & Release Quality Process
275275
276-
Hi Team,
276+
Hi Team,
277277
As part of our new **MetaMask Release Quality Process**, here’s a quick overview of the key processes, testing strategies, and milestones to ensure a smooth and high-quality deployment.
278278
279279
---
280280
281281
## 📋 Key Processes
282282
283283
### Testing Strategy
284-
- **Developer Teams:**
285-
Conduct regression and exploratory testing for your functional areas, including automated and manual tests for critical workflows.
286-
- **QA Team:**
287-
Focus on exploratory testing across the wallet, prioritize high-impact areas, and triage any Sentry errors found during testing.
288-
- **Customer Success Team:**
284+
- **Developer Teams:**
285+
Conduct regression and exploratory testing for your functional areas, including automated and manual tests for critical workflows.
286+
- **QA Team:**
287+
Focus on exploratory testing across the wallet, prioritize high-impact areas, and triage any Sentry errors found during testing.
288+
- **Customer Success Team:**
289289
Validate new functionalities and provide feedback to support release monitoring.
290290
291291
### GitHub Signoff
292-
- Each team must **sign off on the Release Candidate (RC)** via GitHub by the end of the validation timeline (**Tuesday EOD PT**).
292+
- Each team must **sign off on the Release Candidate (RC)** via GitHub by the end of the validation timeline (**Tuesday EOD PT**).
293293
- Ensure all tests outlined in the Testing Plan are executed, and any identified issues are addressed.
294294
295295
### Issue Resolution
296-
- **Resolve all Release Blockers** (Sev0 and Sev1) by **Tuesday EOD PT**.
296+
- **Resolve all Release Blockers** (Sev0 and Sev1) by **Tuesday EOD PT**.
297297
- For unresolved blockers, PRs may be reverted, or feature flags disabled to maintain release quality and timelines.
298298
299299
### Cherry-Picking Criteria
300-
- Only **critical fixes** meeting outlined criteria will be cherry-picked.
300+
- Only **critical fixes** meeting outlined criteria will be cherry-picked.
301301
- Developers must ensure these fixes are thoroughly reviewed, tested, and merged by **Tuesday EOD PT**.
302302
303303
---
304304
305305
## 🗓️ Timeline and Milestones
306306
307-
1. **Today (Friday):** Begin Release Candidate validation.
308-
2. **Tuesday EOD PT:** Finalize RC with all fixes and cherry-picks.
309-
3. **Wednesday:** Buffer day for final checks.
310-
4. **Thursday:** Submit release to app stores and begin rollout to 1% of users.
311-
5. **Monday:** Scale deployment to 10%.
307+
1. **Today (Friday):** Begin Release Candidate validation.
308+
2. **Tuesday EOD PT:** Finalize RC with all fixes and cherry-picks.
309+
3. **Wednesday:** Buffer day for final checks.
310+
4. **Thursday:** Submit release to app stores and begin rollout to 1% of users.
311+
5. **Monday:** Scale deployment to 10%.
312312
6. **Tuesday:** Full rollout to 100%.
313313
314314
---
@@ -320,9 +320,9 @@ Each team is responsible for signing off via GitHub. Use the checkbox below to t
320320
# Team sign-off checklist
321321
- [ ] ${platform_team_name}
322322
323-
This process is a major step forward in ensuring release stability and quality. Let’s stay aligned and make this release a success! 🚀
323+
This process is a major step forward in ensuring release stability and quality. Let’s stay aligned and make this release a success! 🚀
324324
325-
Feel free to reach out if you have questions or need clarification.
325+
Feel free to reach out if you have questions or need clarification.
326326
327327
Many thanks in advance
328328
@@ -381,8 +381,8 @@ create_changelog_pr() {
381381
echo "Previous version is not a recognized release branch pattern. Treating as tag or SHA: ${previous_version_ref}"
382382
fi
383383

384-
# Switch to github-tools directory
385-
cd ./github-tools/
384+
# Switch to .github-tools directory
385+
cd ./.github-tools/
386386
ls -ltra
387387
corepack prepare yarn@4.5.1 --activate
388388
# This can't be done from the actions context layer due to the upstream repository having it's own context set with yarn
@@ -401,7 +401,7 @@ create_changelog_pr() {
401401
# # Create a new Release Sheet Page for the new version with our commits.csv content
402402
# yarn run update-release-sheet "${platform}" "${new_version}" "${GOOGLE_DOCUMENT_ID}" "./commits.csv" "${PROJECT_GIT_DIR}" "${MOBILE_TEMPLATE_SHEET_ID}" "${EXTENSION_TEMPLATE_SHEET_ID}"
403403
# fi
404-
# Note: Only change directories when we actually entered ./github-tools/
404+
# Note: Only change directories when we actually entered ./.github-tools/
405405

406406
# Commit and Push Changelog Changes (exclude commits.csv)
407407
echo "Adding and committing changes.."
@@ -441,7 +441,7 @@ create_version_bump_pr() {
441441

442442
# Update version files on main branch
443443
echo "Running version update scripts for ${main_branch} branch.."
444-
./github-tools/.github/scripts/set-semvar-version.sh "${next_version}" "${platform}"
444+
./.github-tools/.github/scripts/set-semvar-version.sh "${next_version}" "${platform}"
445445

446446
# Commit version bump changes
447447
echo "Committing version bump changes.."

.github/scripts/tests/test-create-platform-release-pr-full.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ ls() { echo "MOCK: ls $*"; return 0; }
8181
pwd() { echo "/mock/directory"; return 0; }
8282

8383
# Create mock version script
84-
mkdir -p ./github-tools/.github/scripts/
85-
cat > ./github-tools/.github/scripts/set-semvar-version.sh << 'EOF'
84+
mkdir -p ./.github-tools/.github/scripts/
85+
cat > ./.github-tools/.github/scripts/set-semvar-version.sh << 'EOF'
8686
#!/usr/bin/env bash
8787
echo "MOCK: Version script - Setting $2 to version $1"
8888
EOF
89-
chmod +x ./github-tools/.github/scripts/set-semvar-version.sh
89+
chmod +x ./.github-tools/.github/scripts/set-semvar-version.sh
9090

9191
# Export all mocks
9292
export -f git gh npx yarn corepack cd ls pwd
@@ -176,7 +176,7 @@ echo "Test version bump: $(get_version_bump_branch_name "2.1.0")"
176176
echo ""
177177
echo "5️⃣ CLEANUP"
178178
echo "==========="
179-
rm -rf ./github-tools/
179+
rm -rf ./.github-tools/
180180
echo "✅ Cleaned up mock files"
181181

182182
echo ""

.github/workflows/changelog-check.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ jobs:
5656
path: target-repo
5757
fetch-depth: 0
5858

59-
- name: Checkout github-tools repository
59+
- name: Checkout GitHub tools repository
6060
if: ${{ steps.label-check.outputs.skip_check != 'true' }}
61-
uses: actions/checkout@v4
61+
uses: actions/checkout@v5
6262
with:
63-
repository: MetaMask/github-tools
64-
ref: ${{ inputs.action-sha }}
65-
path: github-tools
63+
repository: ${{ github.action_repository }}
64+
ref: ${{ github.action_ref }}
65+
path: ./.github-tools
6666

6767
- name: Enable Corepack
6868
if: ${{ steps.label-check.outputs.skip_check != 'true' }}
@@ -73,21 +73,21 @@ jobs:
7373
if: ${{ steps.label-check.outputs.skip_check != 'true' }}
7474
uses: actions/setup-node@v4
7575
with:
76-
node-version-file: ./github-tools/.nvmrc
77-
cache-dependency-path: ./github-tools/yarn.lock
76+
node-version-file: ./.github-tools/.nvmrc
77+
cache-dependency-path: ./.github-tools/yarn.lock
7878
cache: yarn
7979

8080
- name: Install dependencies
8181
if: ${{ steps.label-check.outputs.skip_check != 'true' }}
8282
run: yarn --immutable
8383
shell: bash
84-
working-directory: ./github-tools
84+
working-directory: ./.github-tools
8585

8686
- name: Check Changelog
8787
if: ${{ steps.label-check.outputs.skip_check != 'true' }}
8888
id: changelog-check
8989
shell: bash
90-
working-directory: ./github-tools
90+
working-directory: ./.github-tools
9191
env:
9292
BASE_BRANCH: ${{ inputs.base-branch || 'main' }}
9393
PR_NUMBER: ${{ inputs.pr-number }}

.github/workflows/create-release-pr.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ on:
4949
required: true
5050
type: string
5151
description: 'The platform for which the release PR is being created.'
52-
github-tools-version:
53-
type: string
54-
description: 'The version of github-tools to use. Defaults to main.'
55-
default: 'main'
5652
git-user-name:
5753
type: string
5854
description: 'Git user name for commits. Defaults to metamaskbot.'
@@ -86,16 +82,16 @@ jobs:
8682
token: ${{ secrets.github-token }}
8783

8884
# Step 2: Checkout github-tools repository
89-
- name: Checkout github-tools repository
90-
uses: actions/checkout@v4
85+
- name: Checkout GitHub tools repository
86+
uses: actions/checkout@v5
9187
with:
92-
repository: MetaMask/github-tools
93-
ref: ${{ inputs.github-tools-version }}
94-
path: github-tools
88+
repository: ${{ github.action_repository }}
89+
ref: ${{ github.action_ref }}
90+
path: ./.github-tools
9591

9692
# Step 3: Setup environment from github-tools
9793
- name: Checkout and setup environment
98-
uses: ./github-tools/.github/actions/checkout-and-setup
94+
uses: ./.github-tools/.github/actions/checkout-and-setup
9995
with:
10096
is-high-risk-environment: true
10197

@@ -112,7 +108,6 @@ jobs:
112108
MOBILE_TEMPLATE_SHEET_ID: ${{ inputs.mobile-template-sheet-id }}
113109
EXTENSION_TEMPLATE_SHEET_ID: ${{ inputs.extension-template-sheet-id }}
114110
RELEASE_SHEET_GOOGLE_DOCUMENT_ID: ${{ inputs.release-sheet-google-document-id }}
115-
GITHUB_TOOLS_VERSION: ${{ inputs.github-tools-version }}
116111
GIT_USER_NAME: ${{ inputs.git-user-name }}
117112
GIT_USER_EMAIL: ${{ inputs.git-user-email }}
118113
run: |
@@ -130,7 +125,6 @@ jobs:
130125
echo "Mobile Template Sheet ID: $MOBILE_TEMPLATE_SHEET_ID"
131126
echo "Extension Template Sheet ID: $EXTENSION_TEMPLATE_SHEET_ID"
132127
echo "Release Sheet Google Document ID: $RELEASE_SHEET_GOOGLE_DOCUMENT_ID"
133-
echo "GitHub Tools Version: $GITHUB_TOOLS_VERSION"
134128
echo "Git User Name: $GIT_USER_NAME"
135129
echo "Git User Email: $GIT_USER_EMAIL"
136130
echo "-------------"
@@ -158,7 +152,7 @@ jobs:
158152
working-directory: ${{ github.workspace }}
159153
run: |
160154
# Execute the script from github-tools
161-
./github-tools/.github/scripts/create-platform-release-pr.sh \
155+
./.github-tools/.github/scripts/create-platform-release-pr.sh \
162156
"$PLATFORM" \
163157
"$PREVIOUS_VERSION_REF" \
164158
"$SEMVER_VERSION" \

.github/workflows/flaky-test-report.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,26 @@ jobs:
2323
flaky-test-report:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- name: Checkout github-tools repository
27-
uses: actions/checkout@v4
26+
- name: Checkout GitHub tools repository
27+
uses: actions/checkout@v5
2828
with:
29-
repository: MetaMask/github-tools
30-
path: github-tools
29+
repository: ${{ github.action_repository }}
30+
ref: ${{ github.action_ref }}
31+
path: ./.github-tools
3132

3233
- name: Set up Node.js
3334
uses: actions/setup-node@v4
3435
with:
35-
node-version-file: ./github-tools/.nvmrc
36-
cache-dependency-path: ./github-tools/yarn.lock
36+
node-version-file: ./.github-tools/.nvmrc
37+
cache-dependency-path: ./.github-tools/yarn.lock
3738
cache: yarn
3839

3940
- name: Enable Corepack
4041
run: corepack enable
41-
working-directory: ./github-tools
42+
working-directory: ./.github-tools
4243

4344
- name: Install dependencies
44-
working-directory: ./github-tools
45+
working-directory: ./.github-tools
4546
run: yarn --immutable
4647

4748
- name: Run flaky test report script
@@ -50,5 +51,5 @@ jobs:
5051
WORKFLOW_ID: ${{ inputs.workflow_id }}
5152
GITHUB_TOKEN: ${{ secrets.github-token }}
5253
SLACK_WEBHOOK_FLAKY_TESTS: ${{ secrets.slack-webhook-flaky-tests }}
53-
working-directory: ./github-tools
54+
working-directory: ./.github-tools
5455
run: node .github/scripts/create-flaky-test-report.mjs

.github/workflows/get-release-timelines.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
get-release-timelines:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- name: Checkout the 'github-tools' repository
21-
uses: actions/checkout@v4
20+
- name: Checkout GitHub tools repository
21+
uses: actions/checkout@v5
2222
with:
23-
repository: metamask/github-tools
23+
repository: ${{ github.action_repository }}
24+
ref: ${{ github.action_ref }}
25+
path: ./.github-tools
2426

2527
- name: Get release timelines
2628
env:
@@ -30,7 +32,7 @@ jobs:
3032
RUNWAY_APP_ID: ${{ secrets.RUNWAY_APP_ID }}
3133
RUNWAY_API_KEY: ${{ secrets.RUNWAY_API_KEY }}
3234
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
run: .github/scripts/get-release-timelines.sh
35+
run: ./.github-tools/.github/scripts/get-release-timelines.sh
3436

3537
- name: Upload artifact release-timelines-${{ inputs.version }}.csv
3638
uses: actions/upload-artifact@v4

.github/workflows/post-merge-validation.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,30 @@ jobs:
3333
post-merge-validation-tracker:
3434
runs-on: ubuntu-latest
3535
steps:
36-
- name: Checkout github-tools repository
37-
uses: actions/checkout@v4
36+
- name: Checkout GitHub tools repository
37+
uses: actions/checkout@v5
3838
with:
39-
repository: MetaMask/github-tools
40-
path: github-tools
39+
repository: ${{ github.action_repository }}
40+
ref: ${{ github.action_ref }}
41+
path: ./.github-tools
4142

4243
- name: Set up Node.js
4344
uses: actions/setup-node@v4
4445
with:
45-
node-version-file: ./github-tools/.nvmrc
46-
cache-dependency-path: ./github-tools/yarn.lock
46+
node-version-file: ./.github-tools/.nvmrc
47+
cache-dependency-path: ./.github-tools/yarn.lock
4748
cache: yarn
4849

4950
- name: Enable Corepack
5051
run: corepack enable
51-
working-directory: ./github-tools
52+
working-directory: ./.github-tools
5253

5354
- name: Install dependencies
54-
working-directory: ./github-tools
55+
working-directory: ./.github-tools
5556
run: yarn --immutable
5657

5758
- name: Run post-merge-validation script
58-
working-directory: ./github-tools
59+
working-directory: ./.github-tools
5960
env:
6061
SHEET_ID: ${{ inputs.spreadsheet_id }}
6162
START_HOUR_UTC: ${{ inputs.start_hour_utc }}

0 commit comments

Comments
 (0)