Skip to content

update-dev

update-dev #908

Workflow file for this run

name: update-dev
on:
workflow_run:
workflows:
- Build Website - JSON
types:
- completed
branches:
- master
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
update-dev:
runs-on: ubuntu-latest
if: >-
${{
github.event_name != 'workflow_run' ||
(
github.event_name == 'workflow_run' &&
github.event.workflow_run.event == 'push'
)
}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'dev'
- name: Nightly Merge
env:
MERGE_ARGS: --verbose --no-ff --allow-unrelated-histories
CONFIG_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
CONFIG_USERNAME: github-actions[bot]
run: |
git config --global user.email $CONFIG_EMAIL
git config --global user.name $CONFIG_USERNAME
git remote set-url origin https://${{ secrets.NIGHTLY_TOKEN }}@https://github.com/PennyLaneAI/qml.git
git merge $MERGE_ARGS master
if [[ $? -ne 0 ]]; then
echo "Merge conflicts detected; aborting"
git merge --abort
exit 1
else
echo "Merged master into dev successfully; pushing"
fi
git push