update carton #2163
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 carton | |
on: | |
schedule: | |
- cron: "41 16 * * *" | |
workflow_dispatch: | |
push: | |
paths: | |
- "author/carton/*" | |
- ".github/workflows/update-carton.yml" | |
branches-ignore: | |
# to avoid recursion | |
- "auto-update/*" | |
jobs: | |
carton: | |
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/carton | |
- name: build carton | |
run: | | |
git diff | |
if [[ -n "$(git status --short)" ]]; then | |
make install | |
fi | |
working-directory: ./author/carton | |
- 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/carton-" | |
commit-message: "update carton" |