update cpm #1781
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update cpm | |
on: | |
schedule: | |
- cron: "21 15 * * *" | |
workflow_dispatch: | |
push: | |
paths: | |
- "author/cpm/*" | |
- ".github/workflows/update-cpm.yml" | |
branches-ignore: | |
# to avoid recursion | |
- "auto-update/*" | |
jobs: | |
cpm: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: update cpanfile.snapshot | |
run: make update | |
working-directory: ./author/cpm | |
- name: build cpm | |
run: | | |
git diff | |
if [[ -n "$(git status --short)" ]]; then | |
make install | |
fi | |
working-directory: ./author/cpm | |
- name: Generate token | |
id: generate_token | |
uses: shogo82148/actions-github-app-token@v1 | |
- name: commit | |
uses: shogo82148/actions-commit-and-create-pr@v1 | |
with: | |
github-token: ${{ steps.generate_token.outputs.token }} | |
head-branch-prefix: "auto-update/cpm-" | |
commit-message: "update cpm" |