Skip to content

Commit 8607112

Browse files
kenhysWatson1978
andauthored
Backport: Maintenance workflow (fluent#748) (fluent#829)
Backport fluent#748 --------- Signed-off-by: Shizuo Fujita <[email protected]> Signed-off-by: Kentaro Hayashi <[email protected]> Co-authored-by: Watson <[email protected]> Co-authored-by: Shizuo Fujita <[email protected]>
1 parent 7547b65 commit 8607112

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Maintenance - Bundle Update
2+
3+
on:
4+
workflow_dispatch
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
bundle-update:
12+
runs-on: windows-latest
13+
env:
14+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
steps:
16+
- name: Set up Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3.2 # Use same Ruby version with fluent-package bundled
20+
- uses: actions/checkout@v4
21+
- name: Bundle Update
22+
run: |
23+
cd fluent-package
24+
gem install bundler:2.3.27
25+
bundle _2.3.27_ update -j 4
26+
- name: Create Pull Request
27+
run: |
28+
$today=Get-Date -Format "yyyy-MM-dd"
29+
$branch="maintenance/bundle-update/${today}"
30+
31+
git config user.name "github-actions[bot]"
32+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
33+
git switch --create $branch
34+
git add fluent-package/Gemfile.lock
35+
git commit --message "Update Gemfile.lock" --signoff
36+
git push origin $branch
37+
gh pr create --title "Update Gemfile.lock" --body "Update Gemfile.lock by maintenance workflow"

0 commit comments

Comments
 (0)