Skip to content

Add workflow for FI from upstream#13

Merged
dkhalife merged 2 commits intodevelopfrom
workflows/fi
Jan 1, 2025
Merged

Add workflow for FI from upstream#13
dkhalife merged 2 commits intodevelopfrom
workflows/fi

Conversation

@dkhalife
Copy link
Owner

@dkhalife dkhalife commented Jan 1, 2025

No description provided.

Copilot AI review requested due to automatic review settings January 1, 2025 18:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment on lines +9 to +53
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v2
with:
ref: main
- name: Fetch upstream
run: git fetch upstream/main
- name: Merge upstream/main into main
id: merge
run: |
git merge upstream/main
if [ -z "$(git log origin/main..HEAD)" ]; then
echo "::set-output name=new-commits::false"
else
echo "::set-output name=new-commits::true"
fi
- name: Check for merge conflicts
if: steps.merge.outputs.new-commits == 'true'
run: |
if git diff --quiet; then
echo "No merge conflicts"
else
echo "Merge conflicts found"
git diff
exit 1
fi
- name: Create new branch and push changes
id: create-branch
if: steps.merge.outputs.new-commits == 'true'
run: |
BRANCH_NAME="forward-integration-$(date +%Y%m%d%H%M%S)"
git checkout -b $BRANCH_NAME
git push origin $BRANCH_NAME
echo "::set-output name=BRANCH_NAME::$BRANCH_NAME"
- name: Create pull request
if: steps.merge.outputs.new-commits == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Forward integration from upstream/main'
branch: ${{ steps.create-branch.outputs.BRANCH_NAME }}
base: main
title: 'Forward integration from upstream/main'
body: 'This is an automated pull request to integrate changes from upstream/main'

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
echo "::set-output name=BRANCH_NAME::$BRANCH_NAME"
- name: Create pull request
if: steps.merge.outputs.new-commits == 'true'
uses: peter-evans/create-pull-request@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Forward Integrate' step
Uses Step
uses 'peter-evans/create-pull-request' with ref 'v3', not a pinned commit hash
@dkhalife dkhalife merged commit 0435ca2 into develop Jan 1, 2025
4 checks passed
@dkhalife dkhalife deleted the workflows/fi branch January 1, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants