Skip to content

feat: add github action to update the develop branch when a new commi… #1

feat: add github action to update the develop branch when a new commi…

feat: add github action to update the develop branch when a new commi… #1

name: Merge Main onto Develop
on:
push:
branches:
- main
permissions:
contents: write
jobs:
update-develop:
runs-on: ubuntu-latest
# This action should only run on the main repository, not forks
if: ${{ github.repository == 'FacsimiLab/facsimilab-platform' }} # Only run on main repository
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: true
set-safe-directory: '/'
- name: Read the image version
id: package
uses: juliangruber/read-file-action@v1
with:
path: ${{ github.workspace }}/docker/image_version.txt
- name: Merge Main onto Develop
run: |
git checkout develop
git merge main --no-edit
git push origin develop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Matrix Message - Completed GitHub Action
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "FacsimiLab ${{ steps.package.outputs.content }} - Updated the `develop` branch from `main` at https://github.com/FacsimiLab/facsimilab-platform"
server: "matrix.drpranavmishra.com"