Skip to content

Trigger changeset

Trigger changeset #2

on:
pull_request:
branches:
- main
types: [closed]
jobs:
changeset:
if: github.event.pull_request.merged == true && github.event.pull_request.head.label == 'NiklasBuchfink:changeset-release/main'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '2' # Fetches the last two commits
- name: Check for changes in inlang/source-code/editor/package.json
id: check_changes
run: |
CHANGES="$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | sed -n '/inlang\/source-code\/editor\/package.json/p')"
if [ -n "$CHANGES" ]; then
echo "Changes in inlang/source-code/editor/package.json"
echo "changes=true" >> $GITHUB_ENV
else
echo "No changes in inlang/source-code/editor/package.json"
echo "changes=false" >> $GITHUB_ENV
- name: Trigger redeploy
if: env.changes == 'true'
run: |
echo "Triggering redeploy via deploy hook"
curl -X POST ${{ secrets.FINK_DEPLOY_HOOK_URL }}