chore!: Checkout action using action_ref#163
Conversation
| - run: echo "Setup E2E Environment started" | ||
| shell: bash | ||
|
|
||
| - name: Checkout GitHub tools repository |
There was a problem hiding this comment.
Added this so we can use the local checkout below instead of referencing github-tools by commit.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| repository: metamask/github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values when called via workflow_call. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: Using action_ref in workflow_call contexts unavailable
The github.action_repository and github.action_ref context variables are not available in workflow_call contexts. These variables are only populated when steps use composite actions, not when workflows are called directly. This checkout step will fail with empty values. These workflows need either to be called as actions (not workflows) or use a different mechanism to obtain the correct ref.
| path: github-tools | ||
| repository: ${{ github.action_repository }} | ||
| ref: ${{ github.action_ref }} | ||
| path: ./.github-tools |
There was a problem hiding this comment.
Bug: workflow_dispatch triggered workflow uses empty action context variables
The stable-sync workflow supports both workflow_dispatch and workflow_call triggers. When triggered via workflow_dispatch, github.action_repository and github.action_ref will be empty/null. This causes the checkout step to fail when someone manually triggers the workflow. These context variables are only available when a workflow is called as an action, not when manually dispatched.
|
Need to rethink this. |
This changes all instances where we need to reference another action in
github-toolsto use a local checkout in the.github-toolsdirectory, usinggithub.action_refas ref. This ensures we check out a compatible version, sincegithub.action_refwill be set to the ref that was used to callgithub-toolsin the first place.Note
Standardizes all GitHub workflows/actions to locally checkout
github-toolsto./.github-toolsusinggithub.action_repositoryandgithub.action_ref, updating paths and scripts accordingly, and adds a composite changelog check action.MetaMask/github-toolsrefs (and pinned SHAs) with local checkout:actions/checkout@v5of${{ github.action_repository }}@${{ github.action_ref }}into./.github-tools../.github-toolsfor Node setup, Corepack/Yarn, working directories, and script execution acrosschangelog-check,create-release-pr,flaky-test-report,get-release-timelines,post-merge-validation,publish-slack-release-testing-status,remove-rca-needed-label-sheets,stable-sync, andupdate-release-changelog..gitignorehandling instable-syncto ignore./.github-tools/../.github/actions/changelog-checkusing local./.github-toolscheckout.setup-e2e-env: use local./.github-tools/.github/actions/configure-keystore.create-platform-release-pr.sh: invoke version/update helpers from./.github-tools, update working directories and messaging; fix directory names.test-create-platform-release-pr-full.shto./.github-tools.actions/checkouttov5.Written by Cursor Bugbot for commit b0fd4a8. This will update automatically on new commits. Configure here.