update workflow name #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EXAMPLE WORKFLOW - DO NOT RUN | |
# This is a demonstration file showing how to set up a GitHub Actions workflow for Frenglish translation. | |
# To use this workflow, rename the file, remove this comment, and adjust the configuration as needed. | |
name: Frenglish Translation Example | |
on: | |
push: | |
branches: | |
- '**' # This will trigger on pushes to any branch | |
jobs: | |
translate: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
npm install | |
npm install frenglish | |
- name: Get branch name | |
id: branch-name | |
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
- name: Run translation script | |
env: | |
FRENGLISH_API_KEY: ${{ secrets.FRENGLISH_API_KEY }} | |
run: node .github/scripts/translate.js | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Add translated files | |
title: "Frenglish Translation Update for ${{ steps.branch-name.outputs.branch }}" | |
body: "This PR contains updated translations for the changed files in branch ${{ steps.branch-name.outputs.branch }}." | |
branch: ${{ steps.branch-name.outputs.branch }}-frenglish-translations | |
base: ${{ steps.branch-name.outputs.branch }} |