-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
677 changed files
with
1,599 additions
and
20,547 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
name: Commit Bot | ||
|
||
# Instructions | ||
# | ||
# - One-time setup: create a personal access token with permissions. Then configure it here | ||
# as secrets.CI_PAT. https://github.com/boostorg/boost/settings/secrets/actions | ||
# The reason is explained in https://github.com/orgs/community/discussions/25702 | ||
# "If an action pushes code using the repository's GITHUB_TOKEN, a new workflow will not run" | ||
# | ||
# - Processing of either the 'master' or 'develop' branch may be stopped by creating the variables | ||
# vars.block_master or vars.block_develop with any value. | ||
# https://github.com/boostorg/boost/settings/variables/actions | ||
# | ||
|
||
# To avoid infinite loops, don't trigger on "push" | ||
on: | ||
schedule: | ||
|
@@ -19,12 +31,26 @@ jobs: | |
- name: Check for module updates | ||
id: branches | ||
run: | | ||
if [[ "${{ github.event_name }}" == "push" ]]; then | ||
branches="${{ github.ref_name }}" | ||
else | ||
branches="master develop" | ||
fi | ||
echo "branches=$branches" >> $GITHUB_OUTPUT | ||
set -xe | ||
branches="" | ||
if [[ "${{ github.event_name }}" == "push" ]]; then | ||
if [[ ! -n "${{ vars.block_master }}" && "${{ github.ref_name }}" == "master" ]]; then | ||
branches="master" | ||
elif [[ ! -n "${{ vars.block_develop }}" && "${{ github.ref_name }}" == "develop" ]]; then | ||
branches="develop" | ||
else | ||
branches="${{ github.ref_name }}" | ||
fi | ||
else | ||
# from a schedule: | ||
if [[ ! -n "${{ vars.block_master }}" ]]; then | ||
branches="master" | ||
fi | ||
if [[ ! -n "${{ vars.block_develop }}" ]]; then | ||
branches="${branches} develop" | ||
fi | ||
fi | ||
echo "branches=$branches" >> $GITHUB_OUTPUT | ||
- name: Checkout master repository | ||
uses: actions/checkout@v4 | ||
|
@@ -45,11 +71,11 @@ jobs: | |
- name: Check for module updates | ||
run: | | ||
branches="${{ steps.branches.outputs.branches }}" | ||
# Set up Git | ||
# Set up Git | ||
git config --global user.name "boost-commitbot" | ||
git config --global user.email "[email protected]" | ||
# Update each branch | ||
for branch in $branches; do | ||
cd $branch | ||
|
@@ -74,7 +100,7 @@ jobs: | |
echo "$submodule_name ($commit_id): OK" | ||
else | ||
echo "$submodule_name: $previous_commit_id -> $commit_id" | ||
set -x | ||
set -x | ||
set +e | ||
git submodule update --init "$submodule_path" | ||
git submodule update --remote "$submodule_path" | ||
|
@@ -104,4 +130,3 @@ jobs: | |
github_token: ${{ secrets.CI_PAT }} | ||
branch: develop | ||
directory: develop | ||
|
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
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
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
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
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
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
Oops, something went wrong.