Skip to content

Push Build

Push Build #286

name: Push Build
on:
workflow_dispatch:
push:
branches:
- 'main'
schedule:
# this cron string runs at 06:00:00am, every 2 days starting on the 1st, every month
- cron: "0 6 */2 * *"
jobs:
versionUpdateCheck:
timeout-minutes: 10
runs-on: ubuntu-latest
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Update Beam version
id: beamable_updater
uses: beamable/package-update-action@main
with:
project-path: "client"
- name: Print the versions
run: |
echo "Local version is ${{ steps.beamable_updater.outputs.local_version }}"
echo "Remote version is ${{ steps.beamable_updater.outputs.remote_version }}"
echo "Did perform the update: ${{ steps.beamable_updater.outputs.did_perform_update }}"
- name: Check if PR branch exists
id: pr_check
run: echo BRANCH_ALREADY_EXISTS=$(if [ -n "$(git rev-parse --verify --quiet origin/beam${{ steps.beamable_updater.outputs.remote_version }})" ]; then echo "true"; else echo "false"; fi) >> $GITHUB_ENV
- name: Create Pull Request
if: ${{ steps.beamable_updater.outputs.did_perform_update && env.BRANCH_ALREADY_EXISTS != 'true' }}
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
add-paths: client/Packages
branch: beam${{ steps.beamable_updater.outputs.remote_version }}
title: 'Beamable update: ${{ steps.beamable_updater.outputs.remote_version }}'
commit-message: 'Updated Beamable version to ${{ steps.beamable_updater.outputs.remote_version }}'