Stable Release Step 2 - Validate PR #1
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
name: Stable Release Step 2 - Validate PR | |
on: | |
workflow_dispatch: | |
# pull_request: | |
# types: | |
# - open | |
# branches: | |
# - dev-branch | |
# - stable | |
jobs: | |
Merge-After-All-Tests-Passed: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/stable' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Merge The PR | |
run: | | |
echo 'Get the tag' | |
git fetch origin dev-branch | |
git checkout dev-branch | |
system_file="$(git rev-parse --show-toplevel)/packages/web/lib/fog/system.class.php" | |
tag=$(grep "define('FOG_VERSION'" $system_file | sed "s/.*FOG_VERSION', '\([^']*\)');/\1/") | |
git checkout stable | |
echo "merge the pull request bringing dev-branch into stable"; | |
gh pr merge dev-branch --squash --subject "Stable Release - ${tag}"; | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# on a monthly pr created from other workflow | |
# test validity of install | |
# down the road-test various functions (deploy, capture, API) | |
# Fix version if needed | |
# merge pull request with generic commit | |
# maybe update version if not handled in hook |