Files
static-pages/.github/workflows/import-post.yml
T
renovate[bot] d29c554b77 chore(deps): update github-actions (#395)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 11:46:28 +01:00

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@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
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@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
- 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@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 }}"