mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 13:23:05 +08:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
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@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
|
with:
|
|
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
|
|
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
|
with:
|
|
persist-credentials: false
|
|
ref: 'main'
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.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@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
|
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 }}"
|