Skip to content

Commit

Permalink
Merge pull request #2 from metacpan/master
Browse files Browse the repository at this point in the history
merge master
  • Loading branch information
theokeist authored Jan 3, 2024
2 parents 7cff2e9 + 37e341c commit 71f9a6a
Show file tree
Hide file tree
Showing 30 changed files with 1,927 additions and 1,943 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ on:
jobs:
enable-auto-merge:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'metacpan-bot'
if: github.event.pull_request.user.login == 'metacpan-automation[bot]'
steps:
- uses: alexwilson/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Generate Auth Token
id: auth-token
uses: jamestrousdale/[email protected]
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ steps.auth-token.outputs.access-token }}
pull-request-number: ${{ github.event.pull_request.number }}
2 changes: 1 addition & 1 deletion .github/workflows/build-production-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push build to Docker Hub
run: docker push metacpan/metacpan-web:latest
run: docker push --all-tags metacpan/metacpan-web
61 changes: 42 additions & 19 deletions .github/workflows/update-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,71 @@ jobs:
update-dep:
runs-on: "ubuntu-20.04"
steps:
- name: Generate Auth Token
id: auth-token
uses: jamestrousdale/[email protected]
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- id: git-user
name: Set up git user
uses: haarg/setup-git-user@v1
with:
jwt: ${{ steps.auth-token.outputs.jwt }}
- uses: actions/checkout@v3
with:
token: ${{ secrets.METACPAN_BOT_TOKEN }}
token: ${{ steps.auth-token.outputs.access-token }}
- name: Set up installation local::lib
run: |
mkdir -p $RUNNER_TEMP/perl5/bin
mkdir -p $RUNNER_TEMP/perl5/lib/perl5
echo "$RUNNER_TEMP/perl5/bin" >> "$GITHUB_PATH"
echo "PERL5LIB=$RUNNER_TEMP/perl5/lib/perl5" >> "$GITHUB_ENV"
- name: Get cpm
run: |
curl -sL -o $RUNNER_TEMP/cpm https://git.io/cpm
chmod +x $RUNNER_TEMP/cpm
- name: Install deps
curl -sL -o $RUNNER_TEMP/perl5/bin/cpm https://raw.githubusercontent.com/skaji/cpm/main/cpm
chmod +x $RUNNER_TEMP/perl5/bin/cpm
- name: Install cpanm, Carton, and Carton::Snapshot
run: >
$RUNNER_TEMP/cpm
install
--cpanfile cpanfile
--resolver metacpan
cpm install
App::cpanminus
Carton
Carton::Snapshot
--without-test
--show-build-log-on-failure
--local-lib-contained=local
--local-lib-contained=$RUNNER_TEMP/perl5
- name: Install forced deps
run: >
curl -sL https://cpanmin.us/
| perl -
cpanm
--cpanfile cpanfile.forced
--showdeps --installdeps
-L local
-q
.
| $RUNNER_TEMP/cpm
install
| cpm install
--without-test
--resolver metacpan
--show-build-log-on-failure
--local-lib-contained=local
--reinstall
-
- name: Install deps
run: >
cpm install
--cpanfile cpanfile
--resolver metacpan
--show-build-log-on-failure
--local-lib-contained=local
- name: Maybe update cpanfile.snapshot
run: perl -Ilocal/lib/perl5 local/bin/carton
run: carton
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.METACPAN_BOT_TOKEN }}
token: ${{ steps.auth-token.outputs.access-token }}
commit-message: Update cpanfile.snapshot
title: Update cpanfile.snapshot
author: MetaCPAN Bot <[email protected]>
committer: MetaCPAN Bot <[email protected]>
author: ${{ steps.git-user.outputs.user-full }}
committer: ${{ steps.git-user.outputs.user-full }}
body: |
[GitHub Action Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
push-to-fork: metacpan-bot/metacpan-web
branch: update-cpanfile-snapshot
2 changes: 1 addition & 1 deletion bin/purge.pl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ =head1 DESCRIPTION
elsif ( $opt->list ) {
## no critic (MutatingList)
print grep { !/_cache_key_for_user/ }
map { s/\A.+:\s+\$c->add_surrogate_key\((.+?)\);\Z/$1/; $_ }
map { s/\A.+:\s+\$c->add_surrogate_key\((.+?)\);\Z/$1/; $_ }
qx{git grep add_surrogate_key lib/MetaCPAN/Web/Controller/};
}
else {
Expand Down
3 changes: 2 additions & 1 deletion cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ requires 'Try::Tiny', '0.24';
requires 'Type::Library';
requires 'Types::Common::Numeric';
requires 'Types::Common::String';
requires 'Types::DateTime';
requires 'Types::LoadableClass';
requires 'Types::Path::Tiny';
requires 'Types::Standard';
Expand All @@ -95,7 +96,7 @@ requires 'App::Prove';
requires 'Code::TidyAll', '>= 0.74';
requires 'Code::TidyAll::Plugin::Test::Vars', '0.04';
requires 'Perl::Critic', '1.136';
requires 'Perl::Tidy' => '20220613';
requires 'Perl::Tidy' => '20230909';
requires 'Test::Code::TidyAll';
requires 'Test::More', '0.96';
requires 'Test::Needs';
Expand Down
Loading

0 comments on commit 71f9a6a

Please sign in to comment.