-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ee28a8
commit 849de22
Showing
3 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: auto merge pull requests | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- unlabeled | ||
- synchronize | ||
- opened | ||
- edited | ||
- ready_for_review | ||
- reopened | ||
- unlocked | ||
pull_request_review: | ||
types: | ||
- submitted | ||
check_suite: | ||
types: | ||
- completed | ||
status: {} | ||
|
||
jobs: | ||
automerge: | ||
runs-on: ledgerhq-shared-small | ||
timeout-minutes: 60 | ||
steps: | ||
|
||
- name: Automatically merge pull requests | ||
timeout-minutes: 60 | ||
uses: gsoc2/[email protected] | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.CI_BOT_TOKEN }}" | ||
MERGE_LABELS: automerge | ||
MERGE_METHOD: squash | ||
MERGE_FILTER_AUTHOR: '^(dependabot|renovate|ldg-github-ci)$' | ||
MERGE_FORKS: false | ||
MERGE_RETRIES: 120 | ||
MERGE_RETRY_SLEEP: 30 | ||
MERGE_DELETE_BRANCH: true | ||
BASE_BRANCHES: 'next' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: update submodules | ||
|
||
on: | ||
schedule: | ||
- cron: '0 7 * * *' | ||
repository_dispatch: | ||
types: [submodules] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
HEAD_BRANCH: "update_submodules" | ||
BASE_BRANCH: "main" | ||
|
||
jobs: | ||
update_submodules: | ||
name: update submodules | ||
runs-on: ledgerhq-shared-small | ||
timeout-minutes: 60 | ||
steps: | ||
|
||
- name: Checkout | ||
timeout-minutes: 10 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
|
||
- name: Fetch all branches | ||
timeout-minutes: 10 | ||
run: git fetch origin +refs/heads/*:refs/remotes/origin/* | ||
|
||
- name: Check if ${{ env.BASE_BRANCH }} branch exists | ||
id: check_next_branch | ||
run: | | ||
if git show-ref --quiet refs/remotes/origin/${{ env.BASE_BRANCH }}; then | ||
echo "${{ env.BASE_BRANCH }} branch already exists." | ||
echo "branch_exists=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "${{ env.BASE_BRANCH }} branch does not exist." | ||
echo "branch_exists=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create ${{ env.BASE_BRANCH }} branch if it doesn't exist | ||
if: steps.check_next_branch.outputs.branch_exists == 'false' | ||
run: | | ||
git checkout -b ${{ env.BASE_BRANCH }} | ||
git push origin ${{ env.BASE_BRANCH }} | ||
- name: Update Submodules | ||
id: submodules | ||
uses: sgoudham/[email protected] | ||
|
||
- name: Get date | ||
run: echo "CURRENT_DATE=$(date)" >> $GITHUB_ENV | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.CI_BOT_TOKEN }} | ||
commit-message: Update submodules | ||
signoff: false | ||
author: ${{ secrets.CI_BOT_USERNAME }} <${{ secrets.CI_BOT_USERNAME }}@users.noreply.github.com> | ||
branch: ${{ env.HEAD_BRANCH }} | ||
base: ${{ env.BASE_BRANCH }} | ||
delete-branch: false | ||
add-paths: | | ||
inputs/* | ||
outputs/* | ||
title: 'chore: update submodules - ${{ env.CURRENT_DATE }}' | ||
body: ${{ steps.submodules.outputs.prBody }} | ||
labels: assets,automerge | ||
draft: false |