Mise #1
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
--- | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: "mise" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * 0" # once a week at midnight | |
jobs: | |
mise: | |
name: upgrade | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: pull | |
- name: Checkout Default Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: "${{ github.event.repository.default_branch }}" | |
path: default | |
- name: Setup mise | |
uses: jdx/mise-action@v2 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Install dependencies | |
run: mise upgrade --bump | |
- name: Get diff of mise.toml | |
run: | | |
diff -u pull/.mise.toml default/.mise.toml > diff.patch | |
- name: Generate Diff | |
id: diff | |
run: | | |
cat diff.patch | |
echo "diff<<EOF" >> $GITHUB_OUTPUT | |
cat diff.patch >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
path: pull | |
title: "chore(mise): upgrade dependencies" | |
commit-message: "chore(mise): upgrade dependencies" | |
body: | | |
Dependency upgraded in `.mise.toml` | |
```diff | |
${{ steps.diff.outputs.diff }} | |
``` |