Skip to content

Commit 9478cd5

Browse files
authored
Merge pull request #1382 from metacpan/haarg/update-snapshot-update
update cpanfile.snapshot updating
2 parents 692ab18 + 90c777e commit 9478cd5

File tree

2 files changed

+19
-41
lines changed

2 files changed

+19
-41
lines changed

.github/workflows/update-snapshot.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,24 @@ jobs:
99
container:
1010
image: perl:5.22-buster
1111
steps:
12-
- name: install jq
13-
run: |
14-
apt-get update && apt-get install -y jq
1512
- name: Generate Auth Token
16-
id: auth-token
17-
uses: jamestrousdale/github-app-jwt-token@0.1.4
13+
uses: actions/create-github-app-token@v2
14+
id: app-token
1815
with:
1916
app-id: ${{ secrets.APP_ID }}
2017
private-key: ${{ secrets.APP_PRIVATE_KEY }}
21-
- id: git-user
22-
name: Set up git user
23-
uses: haarg/setup-git-user@v1
24-
with:
25-
jwt: ${{ steps.auth-token.outputs.jwt }}
2618
- uses: actions/checkout@v4
2719
with:
28-
token: ${{ steps.auth-token.outputs.access-token }}
29-
- name: Set up installation local::lib
30-
run: |
31-
mkdir -p $RUNNER_TEMP/perl5/bin
32-
mkdir -p $RUNNER_TEMP/perl5/lib/perl5
33-
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
34-
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5" >> "$GITHUB_ENV"
35-
- name: Get cpm
36-
run: |
37-
curl -sL -o $RUNNER_TEMP/perl5/bin/cpm https://raw.githubusercontent.com/skaji/cpm/main/cpm
38-
chmod +x $RUNNER_TEMP/perl5/bin/cpm
39-
- name: Install Carton and Carton::Snapshot
40-
run: >
41-
cpm install
42-
Carton
43-
Carton::Snapshot
44-
--without-test
45-
--show-build-log-on-failure
46-
--local-lib-contained=$RUNNER_TEMP/perl5
47-
- name: Install deps
48-
run: >
49-
cpm install
50-
--cpanfile cpanfile
51-
--resolver metacpan
52-
--show-build-log-on-failure
53-
--local-lib-contained=local
54-
- name: Maybe update cpanfile.snapshot
55-
run: carton
20+
token: ${{ steps.app-token.outputs.token }}
21+
- name: Update cpanfile.snapshot
22+
uses: metacpan/metacpan-actions/update-snapshot@master
5623
- name: Create Pull Request
5724
uses: peter-evans/create-pull-request@v7
5825
with:
59-
token: ${{ steps.auth-token.outputs.access-token }}
26+
token: ${{ steps.app-token.outputs.token }}
6027
commit-message: Update cpanfile.snapshot
6128
title: Update cpanfile.snapshot
62-
author: ${{ steps.git-user.outputs.user-full }}
63-
committer: ${{ steps.git-user.outputs.user-full }}
29+
sign-commits: true
6430
body: |
6531
[GitHub Action Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
6632
branch: update-cpanfile-snapshot

cpanfile.forced

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# transitive deps
2+
# Not used directly, but they need to be explicitly listed to ensure they are
3+
# in our cpanfile.snapshot at appropriate versions. Either for older perl
4+
# versions, or unpredictable dynamic deps. These will be installed using a
5+
# different process to ensure they are present in the snapshot, even if they
6+
# would be satisfied by core.
7+
requires 'CPAN::Meta', '2.141520';
8+
requires 'Devel::PPPort', '3.62'; # for older perls
9+
requires 'ExtUtils::MakeMaker', '7.76';
10+
requires 'version', '0.9929'; # for older perls
11+
requires 'Module::Signature', '0.90';
12+
requires 'Pod::Parser', '1.67'; # for newer perls

0 commit comments

Comments
 (0)