Skip to content

Commit f57ca80

Browse files
committed
Merge branch 'main' into releases/v1
2 parents 9f45d01 + 1228166 commit f57ca80

33 files changed

+1744
-1529
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7-
time: "18:27"
87
open-pull-requests-limit: 10
8+
ignore:
9+
# update too often, ignore patch releases
10+
- dependency-name: "@types/node"
11+
update-types: ["version-update:semver-patch"]

.github/workflows/test.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ jobs:
4141
- run: npm run package
4242
- run: npm test
4343

44-
- name: use the action
44+
- id: setup-perl
45+
name: use the action
4546
uses: ./
4647
with:
4748
perl-version: "5.30.0"
4849
multi-thread: ${{ matrix.multi-thread }}
50+
- name: show outputs
51+
run: |
52+
echo "perl-version: ${{ steps.setup-perl.outputs.perl-version }}"
53+
echo "perl-hash: ${{ steps.setup-perl.outputs.perl-hash }}"
4954
5055
- run: gcc --version
51-
5256
- name: run perl -V on bash
5357
run: perl -V
5458
shell: bash
@@ -115,14 +119,18 @@ jobs:
115119
- run: npm run package
116120
- run: npm test
117121

118-
- name: use the action
122+
- id: setup-perl
123+
name: use the action
119124
uses: ./
120125
with:
121126
perl-version: "5.30.0"
122127
multi-thread: ${{ matrix.multi-thread }}
128+
- name: show outputs
129+
run: |
130+
echo "perl-version: ${{ steps.setup-perl.outputs.perl-version }}"
131+
echo "perl-hash: ${{ steps.setup-perl.outputs.perl-hash }}"
123132
124133
- run: gcc --version
125-
126134
- name: run perl -V on bash
127135
run: perl -V
128136
shell: bash
@@ -192,14 +200,18 @@ jobs:
192200
- run: npm run package
193201
- run: npm test
194202

195-
- name: use the action
203+
- id: setup-perl
204+
name: use the action
196205
uses: ./
197206
with:
198207
perl-version: "5.30.0"
199208
multi-thread: ${{ matrix.multi-thread }}
209+
- name: show outputs
210+
run: |
211+
Write-Output "perl-version: ${{ steps.setup-perl.outputs.perl-version }}"
212+
Write-Output "perl-hash: ${{ steps.setup-perl.outputs.perl-hash }}"
200213
201214
- run: gcc --version
202-
203215
- name: run perl -V on bash
204216
run: perl -V
205217
shell: bash
@@ -268,14 +280,18 @@ jobs:
268280
- run: npm run package
269281
- run: npm test
270282

271-
- name: use the action
283+
- id: setup-perl
284+
name: use the action
272285
uses: ./
273286
with:
274287
perl-version: "5.30.0"
275288
distribution: strawberry
289+
- name: show outputs
290+
run: |
291+
Write-Output "perl-version: ${{ steps.setup-perl.outputs.perl-version }}"
292+
Write-Output "perl-hash: ${{ steps.setup-perl.outputs.perl-hash }}"
276293
277294
- run: gcc --version
278-
279295
- name: run perl -V on bash
280296
run: perl -V
281297
shell: bash

.github/workflows/update-build-tools.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,15 @@ jobs:
8282
- linux
8383
- darwin
8484
- windows
85+
permissions:
86+
id-token: write
87+
contents: write
88+
pull-requests: write
89+
8590
steps:
8691
- name: Generate token
8792
id: generate_token
88-
uses: tibdex/github-app-token@v1
89-
with:
90-
app_id: ${{ secrets.APP_ID }}
91-
private_key: ${{ secrets.PRIVATE_KEY }}
93+
uses: shogo82148/actions-github-app-token@v0
9294

9395
- name: Checkout
9496
uses: actions/checkout@v2

.github/workflows/update-carton.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,33 @@ on:
33
schedule:
44
- cron: "41 16 * * *"
55
workflow_dispatch:
6+
push:
7+
paths:
8+
- "author/carton/*"
9+
- ".github/workflows/update-carton.yml"
10+
branches-ignore:
11+
# to avoid recursion
12+
- "auto-update/*"
613

714
jobs:
815
carton:
916
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
contents: write
20+
pull-requests: write
21+
1022
steps:
1123
- name: Generate token
1224
id: generate_token
13-
uses: tibdex/github-app-token@v1
14-
with:
15-
app_id: ${{ secrets.APP_ID }}
16-
private_key: ${{ secrets.PRIVATE_KEY }}
25+
uses: shogo82148/actions-github-app-token@v0
1726

1827
- name: Checkout
1928
uses: actions/checkout@v2
2029
with:
2130
token: ${{ steps.generate_token.outputs.token }}
31+
ref: main
32+
fetch-depth: 0
2233

2334
- name: update cpanfile.snapshot
2435
run: make update
@@ -34,15 +45,14 @@ jobs:
3445

3546
- name: commit
3647
env:
37-
TOKEN: ${{ steps.generate_token.outputs.token }}
48+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
3849
run: |
39-
branch=update-carton-$(date +"%Y-%m-%d-%H-%M-%S")
50+
branch=auto-update/carton-$(date +"%Y-%m-%d-%H-%M-%S")
4051
git config --global user.name "Ichinose Shogo"
4152
git config --global user.email [email protected]
4253
git switch -c "$branch"
4354
git add .
4455
git commit -m "Update carton $(date +"%Y-%m-%d %H:%M:%S")" || exit 0
4556
git push -u origin "$branch"
46-
curl -H "Authorization: token $TOKEN" \
47-
-d "$(jq --arg branch $branch -n '{ "title": "Auto Update carton", "base": "main", "head": $branch }')" \
48-
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls"
57+
gh pr create --fill --title "Auto Update carton" --base main --head "$branch" \
58+
--body "This PR is auto generated by [${{ github.workflow }} workflow](${{ github.server_url }}/${{ github.repository }}/workflows/update-carton.yml)."

.github/workflows/update-cpanm.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,33 @@ on:
33
schedule:
44
- cron: "22 6 * * *"
55
workflow_dispatch:
6+
push:
7+
paths:
8+
- "author/cpanm/*"
9+
- ".github/workflows/update-cpanm.yml"
10+
branches-ignore:
11+
# to avoid recursion
12+
- "auto-update/*"
613

714
jobs:
815
cpanm:
916
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
contents: write
20+
pull-requests: write
21+
1022
steps:
1123
- name: Generate token
1224
id: generate_token
13-
uses: tibdex/github-app-token@v1
14-
with:
15-
app_id: ${{ secrets.APP_ID }}
16-
private_key: ${{ secrets.PRIVATE_KEY }}
25+
uses: shogo82148/actions-github-app-token@v0
1726

1827
- name: Checkout
1928
uses: actions/checkout@v2
2029
with:
2130
token: ${{ steps.generate_token.outputs.token }}
31+
ref: main
32+
fetch-depth: 0
2233

2334
- name: update cpanfile.snapshot
2435
run: make update
@@ -34,15 +45,14 @@ jobs:
3445

3546
- name: commit
3647
env:
37-
TOKEN: ${{ steps.generate_token.outputs.token }}
48+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
3849
run: |
39-
branch=update-cpanm-$(date +"%Y-%m-%d-%H-%M-%S")
50+
branch=auto-update/cpanm-$(date +"%Y-%m-%d-%H-%M-%S")
4051
git config --global user.name "Ichinose Shogo"
4152
git config --global user.email [email protected]
4253
git switch -c "$branch"
4354
git add .
4455
git commit -m "Update cpanm $(date +"%Y-%m-%d %H:%M:%S")" || exit 0
4556
git push -u origin $branch
46-
curl -H "Authorization: token $TOKEN" \
47-
-d "$(jq --arg branch $branch -n '{ "title": "Auto Update cpanm", "base": "main", "head": $branch }')" \
48-
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls"
57+
gh pr create --fill --title "Auto Update cpanm" --base main --head "$branch" \
58+
--body "This PR is auto generated by [${{ github.workflow }} workflow](${{ github.server_url }}/${{ github.repository }}/workflows/update-cpanm.yml)."

.github/workflows/update-cpm.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,33 @@ on:
33
schedule:
44
- cron: "21 15 * * *"
55
workflow_dispatch:
6+
push:
7+
paths:
8+
- "author/cpm/*"
9+
- ".github/workflows/update-cpm.yml"
10+
branches-ignore:
11+
# to avoid recursion
12+
- "auto-update/*"
613

714
jobs:
815
cpm:
916
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
contents: write
20+
pull-requests: write
21+
1022
steps:
1123
- name: Generate token
1224
id: generate_token
13-
uses: tibdex/github-app-token@v1
14-
with:
15-
app_id: ${{ secrets.APP_ID }}
16-
private_key: ${{ secrets.PRIVATE_KEY }}
25+
uses: shogo82148/actions-github-app-token@v0
1726

1827
- name: Checkout
1928
uses: actions/checkout@v2
2029
with:
2130
token: ${{ steps.generate_token.outputs.token }}
31+
ref: main
32+
fetch-depth: 0
2233

2334
- name: update cpanfile.snapshot
2435
run: make update
@@ -34,15 +45,14 @@ jobs:
3445

3546
- name: commit
3647
env:
37-
TOKEN: ${{ steps.generate_token.outputs.token }}
48+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
3849
run: |
39-
branch=update-cpm-$(date +"%Y-%m-%d-%H-%M-%S")
50+
branch=auto-update/cpm-$(date +"%Y-%m-%d-%H-%M-%S")
4051
git config --global user.name "Ichinose Shogo"
4152
git config --global user.email [email protected]
4253
git switch -c "$branch"
4354
git add .
4455
git commit -m "Update cpm $(date +"%Y-%m-%d %H:%M:%S")" || exit 0
4556
git push -u origin $branch
46-
curl -H "Authorization: token $TOKEN" \
47-
-d "$(jq --arg branch $branch -n '{ "title": "Auto Update cpm", "base": "main", "head": $branch }')" \
48-
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls"
57+
gh pr create --fill --title "Auto Update cpm" --base main --head "$branch" \
58+
--body "This PR is auto generated by [${{ github.workflow }} workflow](${{ github.server_url }}/${{ github.repository }}/workflows/update-cpm.yml)."

.prettierrc.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
{
2-
"printWidth": 120,
3-
"tabWidth": 2,
4-
"useTabs": false,
5-
"semi": true,
6-
"singleQuote": true,
7-
"trailingComma": "none",
8-
"bracketSpacing": false,
9-
"arrowParens": "avoid",
10-
"parser": "typescript"
2+
"printWidth": 120
113
}

0 commit comments

Comments
 (0)