-
-
Notifications
You must be signed in to change notification settings - Fork 4
INFRA-3187: Automate Merging Release Branch workflow #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
ed5be17
c87ac05
8f8a22e
860652a
999d4b3
2b07d72
879a51d
f967d6e
1d21176
c12d2b9
22f3e41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Merge Previous Releases | ||
| description: 'An action to merge previous release branches into a newly created release branch.' | ||
|
|
||
| inputs: | ||
| new-release-branch: | ||
| required: true | ||
| description: 'The newly created release branch (e.g., release/2.1.2)' | ||
| github-token: | ||
| description: 'GitHub token used for authentication.' | ||
| required: true | ||
| github-tools-repository: | ||
| description: 'The GitHub repository containing the GitHub tools. Defaults to the GitHub tools action repository, and usually does not need to be changed.' | ||
| required: false | ||
| default: ${{ github.action_repository }} | ||
| github-tools-ref: | ||
| description: 'The SHA of the action to use. Defaults to the current action ref, and usually does not need to be changed.' | ||
| required: false | ||
| default: ${{ github.action_ref }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Checkout GitHub tools repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: ${{ inputs.github-tools-repository }} | ||
| ref: ${{ inputs.github-tools-ref }} | ||
| path: ./github-tools | ||
|
|
||
| - name: Set Git user and email | ||
| shell: bash | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Run merge previous releases script | ||
| env: | ||
| NEW_RELEASE_BRANCH: ${{ inputs.new-release-branch }} | ||
| GITHUB_TOKEN: ${{ inputs.github-token }} | ||
| shell: bash | ||
| run: bash ./github-tools/.github/scripts/merge-previous-releases.sh | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,19 +30,8 @@ jobs: | |
| fetch-depth: 0 | ||
cursor[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| token: ${{ secrets.github-token || secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Checkout GitHub tools repository | ||
| uses: actions/checkout@v5 | ||
| - name: Merge previous releases | ||
| uses: metamask/github-tools/.github/actions/merge-previous-releases@INFRA-3187-AutomateMergingReleaseBranches | ||
|
||
| with: | ||
| repository: metamask/github-tools | ||
| path: ./github-tools | ||
|
|
||
| - name: Set Git user and email | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Run merge previous releases script | ||
| env: | ||
| NEW_RELEASE_BRANCH: ${{ inputs.new-release-branch }} | ||
| GITHUB_TOKEN: ${{ secrets.github-token || secrets.GITHUB_TOKEN }} | ||
| run: bash ./github-tools/.github/scripts/merge-previous-releases.sh | ||
| new-release-branch: ${{ inputs.new-release-branch }} | ||
| github-token: ${{ secrets.github-token || secrets.GITHUB_TOKEN }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this workflow necessary now? The action can be called from other repositories directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I removed the workflow