Skip to content

Stable Release Step 1 - Create PR #6

Stable Release Step 1 - Create PR

Stable Release Step 1 - Create PR #6

name: Stable Release Step 1 - Create PR
on:
workflow_dispatch:
schedule:
- cron: "0 15 16 * *"
jobs:
create-release-pull-request:
if: github.ref == 'refs/heads/stable'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: dev-branch
- name: Create pull request
run: |
echo 'Get version to be released and create PR with that in the name'
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/")
gh pr create -B stable -H dev-branch --title "Stable Release PR For ${tag} - $(date '+%Y-%m-%d')" --body "Pull Request for creating the latest stable release from staged security fixes, bug fixes, and minor enhancements in dev-branch. Created as needed or monthly on 15th of every month, released once tests are passing"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
call-test-validation-workflow:
needs: create-release-pull-request
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: stable
- name: Call test validity workflow
run: gh workflow run stable-releases-2_test-validity.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}