-
Notifications
You must be signed in to change notification settings - Fork 21
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
311ceb0
commit a3cedf0
Showing
2 changed files
with
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Cut Release Branch | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-branch: | ||
description: MapStore branch name to use (YYYY.MM.xx). E.g. 2024.01.xx | ||
required: true | ||
main-branch: | ||
description: main branch | ||
default: master | ||
jobs: | ||
cut-release: | ||
name: Create release branch and PRs into main main branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.main-branch }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create release branch and generate PR body | ||
id: create-branch | ||
env: | ||
RELEASE_BRANCH: ${{ github.event.inputs.release-branch }} | ||
|
||
run: | | ||
# script will go here | ||
echo "Initializing git" | ||
# Optional | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
BRANCH_NAME="${RELEASE_BRANCH}" | ||
echo "creating branch is $BRANCH_NAME" | ||
git checkout -b "$BRANCH_NAME" | ||
git submodule set-branch --branch $BRANCH_NAME MapStore2 | ||
git add .gitmodules | ||
git commit -m "Set branch for submodule MapStore2 to $BRANCH_NAME" | ||
git push --set-upstream origin "$BRANCH_NAME" |
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,33 @@ | ||
|
||
name: Update Submodules | ||
on: | ||
schedule: | ||
# run daily at midnight | ||
- cron: '0 0 * * *' | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Uses the private access token from above link | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Initialize or update each one recursively | ||
- name: Pull & update submodules recursively | ||
run: | | ||
git submodule update --init --recursive | ||
git submodule update --recursive --remote | ||
# Commit to the repo under the GitHub actions user to ensure we have | ||
# reasonable logging to trace back | ||
- name: Commit & push changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions - update submodules" | ||
git commit -am "Update submodules" || echo "No changes to commit" | ||
git push |