-
-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (59 loc) · 2.03 KB
/
Copy pathquarto-extensions.yml
File metadata and controls
68 lines (59 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# @license MIT
# @copyright 2026 Mickaël Canouil
# @author Mickaël Canouil
name: Quarto Extensions Updates
on:
workflow_dispatch:
schedule:
- cron: 00 12 1 * *
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
quarto-extensions-updates:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Create GitHub App token
uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_KEY }}
- name: Get GitHub App User ID
id: get-user-id
if: ${{ steps.app-token.outputs.app-slug != '' }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
run: |
echo "user-id=$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" >> "${GITHUB_OUTPUT}"
- name: Configure Environment for Git User
env:
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
USER_ID: ${{ steps.get-user-id.outputs.user-id }}
run: |
if [ -z "${APP_SLUG}" ]; then
USER_NAME="github-actions[bot]"
USER_EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
else
USER_NAME="${APP_SLUG}[bot]"
USER_EMAIL="${USER_ID}+${APP_SLUG}[bot]@users.noreply.github.com"
fi
git config --global user.name "${USER_NAME}"
git config --global user.email "${USER_EMAIL}"
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: "pre-release"
- name: Update Quarto extensions
uses: mcanouil/quarto-extensions-updater@v2
with:
github-token: ${{ steps.app-token.outputs.token }}
pr-labels: "Type: Dependencies :arrow_up:"
group-updates: true
scan-directories: |
docs