-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workflows to rebase preview and sanchonet branches on push to alpha, …
…or workflow dispatch.
- Loading branch information
1 parent
03133dc
commit d3b35c7
Showing
2 changed files
with
76 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: Rebase preview branch | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- alpha | ||
|
||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: preview | ||
fetch-depth: 0 | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
echo "GitHub Actor: ${GITHUB_ACTOR}" >> "$GITHUB_STEP_SUMMARY" | ||
echo "GitHub Email: ${GITHUB_ACTOR}@users.noreply.github.com" >> "$GITHUB_STEP_SUMMARY" | ||
- name: Fetch alpha | ||
run: | | ||
git fetch origin alpha | ||
- name: Get current SHA | ||
run: | | ||
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Rebase on alpha | ||
run: | | ||
git rebase origin/alpha | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
export MODIFIED=$([ "$(git rev-parse HEAD)" != "$(jq -r '.sha' "$GITHUB_OUTPUT")" ] && echo "true" || echo "false") | ||
echo "MODIFIED=${MODIFIED}" >> "$GITHUB_OUTPUT" | ||
- name: Push changes | ||
if: steps.git-check.outputs.MODIFIED == 'true' | ||
run: git push --force-with-lease |
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: Rebase sanchonet branch | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- alpha | ||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: sanchonet | ||
fetch-depth: 0 | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
echo "GitHub Actor: ${GITHUB_ACTOR}" >> "$GITHUB_STEP_SUMMARY" | ||
echo "GitHub Email: ${GITHUB_ACTOR}@users.noreply.github.com" >> "$GITHUB_STEP_SUMMARY" | ||
- name: Fetch alpha | ||
run: | | ||
git fetch origin alpha | ||
- name: Get current SHA | ||
run: | | ||
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Rebase on alpha | ||
run: | | ||
git rebase origin/alpha | ||
- name: Check for changes | ||
id: git-check | ||
run: | | ||
export MODIFIED=$([ "$(git rev-parse HEAD)" != "$(jq -r '.sha' "$GITHUB_OUTPUT")" ] && echo "true" || echo "false") | ||
echo "MODIFIED=${MODIFIED}" >> "$GITHUB_OUTPUT" | ||
echo "Repository Modified: ${MODIFIED}" >> "$GITHUB_STEP_SUMMARY" | ||
- name: Push changes | ||
if: steps.git-check.outputs.MODIFIED == 'true' | ||
run: git push --force-with-lease |