-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.11 KB
/
main-ro-release.yml
File metadata and controls
37 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Sync Main to Release
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Required to compare branches
- name: Check for Code Differences
id: diff_check
run: |
DIFF=$(git diff origin/release...origin/main --name-only)
if [ -z "$DIFF" ]; then
echo "No changes found between main and release. Skipping."
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "## ⏭️ Sync Skipped" >> $GITHUB_STEP_SUMMARY
echo "Main and Release are already in sync." >> $GITHUB_STEP_SUMMARY
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Run PR Logic
if: steps.diff_check.outputs.has_changes == 'true'
uses: recursivezero/action-club/.github/actions/release-pr@main
with:
# Use your PAT here if the standard token continues to fail
github_token: ${{ secrets.PROJECT_PAT }}