Skip to content

Commit 5311300

Browse files
github-actions[bot]dependabot[bot]mmitche
authored
[release/10.0] Sync branch with origin/main (#8686)
* Bump actions/upload-artifact from 4.6.2 to 5.0.0 (#8682) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@ea165f8...330a01c) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump streetsidesoftware/cspell-action from 7.2.0 to 7.2.1 (#8681) Bumps [streetsidesoftware/cspell-action](https://github.com/streetsidesoftware/cspell-action) from 7.2.0 to 7.2.1. - [Release notes](https://github.com/streetsidesoftware/cspell-action/releases) - [Changelog](https://github.com/streetsidesoftware/cspell-action/blob/main/CHANGELOG.md) - [Commits](streetsidesoftware/cspell-action@dcd03dc...76c6f6d) --- updated-dependencies: - dependency-name: streetsidesoftware/cspell-action dependency-version: 7.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Use arcade backport workflow (#8683) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matt Mitchell <mmitche@microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d1287ae commit 5311300

File tree

5 files changed

+14
-276
lines changed

5 files changed

+14
-276
lines changed

.github/workflows/backport.yml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,17 @@ name: Backport PR to branch
22
on:
33
issue_comment:
44
types: [created]
5+
schedule:
6+
# once a day at 13:00 UTC to cleanup old runs
7+
- cron: '0 13 * * *'
58

6-
permissions: {}
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
actions: write
714

815
jobs:
916
backport:
10-
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/backport to') && contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
11-
runs-on: ubuntu-24.04
12-
permissions:
13-
contents: write
14-
issues: write
15-
pull-requests: write
16-
17-
steps:
18-
- name: Extract backport target branch
19-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
20-
id: target-branch-extractor
21-
with:
22-
result-encoding: string
23-
script: |
24-
if (context.eventName !== "issue_comment") throw "Error: This action only works on issue_comment events.";
25-
26-
// extract the target branch name from the trigger phrase containing these characters: a-z, A-Z, digits, forward slash, dot, hyphen, underscore
27-
const regex = /\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
28-
target_branch = regex.exec(context.payload.comment.body);
29-
if (target_branch == null) throw "Error: No backport branch found in the trigger phrase.";
30-
31-
return target_branch[1];
32-
- name: Post backport started comment to pull request
33-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
34-
with:
35-
script: |
36-
const backport_start_body = `Started backporting to ${{ steps.target-branch-extractor.outputs.result }}: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
37-
await github.rest.issues.createComment({
38-
issue_number: context.issue.number,
39-
owner: context.repo.owner,
40-
repo: context.repo.repo,
41-
body: backport_start_body
42-
});
43-
- name: Checkout repo
44-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
45-
with:
46-
persist-credentials: true # We need to persist credentials to push the resulting changes upstream.
47-
fetch-depth: 0
48-
- name: Run backport
49-
uses: ./eng/actions/backport
50-
with:
51-
target_branch: ${{ steps.target-branch-extractor.outputs.result }}
52-
auth_token: ${{ secrets.GITHUB_TOKEN }}
53-
exclude: 'documentation/**.md'
54-
label: backport
17+
if: ${{ contains(github.event.comment.body, '/backport to') || github.event_name == 'schedule' }}
18+
uses: dotnet/arcade/.github/workflows/backport-base.yml@main

.github/workflows/scan-for-to-do-comments.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
2828

2929
- name: Upload artifacts
30-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
30+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
3131
with:
3232
name: issue-todo
3333
path: issue/

.github/workflows/spellcheck.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ jobs:
1717
with:
1818
persist-credentials: false
1919

20-
- uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d
20+
- uses: streetsidesoftware/cspell-action@76c6f6d52abd57f4bcab5f3fde1bbd4f19a99eb0
2121
name: Documentation spellcheck
2222
if: ${{ !cancelled() }}
2323
with:
2424
files: '**/*.md'
2525
inline: error
2626
incremental_files_only: true
2727

28-
- uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d
28+
- uses: streetsidesoftware/cspell-action@76c6f6d52abd57f4bcab5f3fde1bbd4f19a99eb0
2929
name: Resx spellcheck
3030
if: ${{ !cancelled() }}
3131
with:
3232
files: 'src/**/*.resx'
3333
inline: error
3434
incremental_files_only: true
3535

36-
- uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d
36+
- uses: streetsidesoftware/cspell-action@76c6f6d52abd57f4bcab5f3fde1bbd4f19a99eb0
3737
name: Source code spellcheck
3838
if: ${{ !cancelled() }}
3939
with:

eng/actions/backport/action.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

eng/actions/backport/index.js

Lines changed: 0 additions & 200 deletions
This file was deleted.

0 commit comments

Comments
 (0)