Skip to content

Feature: album grid size #143

Feature: album grid size

Feature: album grid size #143

Workflow file for this run

name: i18n Summary
on:
push:
branches:
- main
paths:
- .phrasey/**
- i18n/**
pull_request_target:
types:
- opened
- edited
workflow_dispatch:
permissions:
contents: write
pull-requests: write
env:
PR_COMMENT: "no"
jobs:
i18n-summary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.13.0"
cache: npm
- name: 🏗️ Prerequisites
run: npm install
- name: 🔨 Build
run: npm run i18n:summary
- name: 🚀 Push summary files
if: github.event_name != 'pull_request_target'
uses: zyrouge/gh-push-action@v1
with:
directory: phrasey-dist
branch: i18n-summary
checkout-orphan: true
force: true
- name: 🔎 Check pull request changes
if: github.event_name == 'pull_request_target' && github.event.pull_request.draft == false
run: |
git fetch origin "${{ github.base_ref }}" --depth=1
echo "PR_COMMENT=$(npm run --silent git:diff-files-yn 'origin/${{ github.base_ref }}' '.phrasey/' 'i18n/')" >> $GITHUB_ENV
- name: 💬 Comment summary
if: env.PR_COMMENT == 'yes'
uses: actions/github-script@v7
with:
script: |
const content = require("fs").readFileSync("phrasey-dist/README.md", "utf-8");
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: content,
});