-
Notifications
You must be signed in to change notification settings - Fork 23
54 lines (47 loc) · 1.91 KB
/
import-post.yml
File metadata and controls
54 lines (47 loc) · 1.91 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
name: Import Outline post
on:
workflow_dispatch:
inputs:
post_url:
required: true
description: 'The URL of the post to import'
jobs:
import:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2
with:
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: 'main'
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Import post
id: import
env:
OUTLINE_POST_URL: ${{ inputs.post_url }}
OUTLINE_API_KEY: ${{ secrets.OUTLINE_API_KEY }}
R2_BUCKET_NAME: ${{ secrets.STATIC_BUCKET_NAME }}
R2_ENDPOINT_URL: ${{ secrets.STATIC_BUCKET_ENDPOINT }}
R2_ACCESS_KEY_ID: ${{ secrets.STATIC_BUCKET_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.STATIC_BUCKET_KEY_SECRET }}
R2_PUBLIC_URL: "https://static.immich.cloud"
run: uv run --script import-post.py
- name: Format
run: pnpm --filter root.immich.app run format:fix
- name: Create PR
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ steps.generate-token.outputs.token }}
add-paths: apps/root.immich.app/src/routes/blog
commit-message: "feat: import ${{ steps.import.outputs.slug }}"
title: "feat: import ${{ steps.import.outputs.slug }}"
branch: "blog/${{ steps.import.outputs.uuid }}"