Skip to content

Instantly share code, notes, and snippets.

@WaKeMaTTa
Last active September 9, 2022 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WaKeMaTTa/20f20d59eb3c4b64c04f80213441ce6e to your computer and use it in GitHub Desktop.
Save WaKeMaTTa/20f20d59eb3c4b64c04f80213441ce6e to your computer and use it in GitHub Desktop.
This GitHub Workflow it will be executed when a new Git branch is created and it has changes inside config/locales.  And his job is to creates and push copy changes in a new phrase.com branch.
# .github/workflows/01-create-phrase-branch.yml
name: "Locales : Create or Update phrase.com (branch)"
on:
push:
branches-ignore:
- main
- staging
- 'auto-phrase-sync-*'
paths:
- 'config/locales/**'
jobs:
build:
name: "Phrase : Create Phrase Branch for GitHub Pull Requests"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Push changes in phrase.com
run: bin/phrase push --branch `git branch --show-current` --wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment