Skip to content

Code formatting config + github workflow for PR #3

Code formatting config + github workflow for PR

Code formatting config + github workflow for PR #3

Workflow file for this run

name: Continuous Integration
# This action works with pull requests and pushes on the main branch
on:
pull_request:
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
sync-branch:
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Git-version
run: git version
- name: Git-remote-add
run: git remote add upstream https://github.com/knhaouari/obsidian-textgenerator-plugin.git
- name: Git-fetch-all
run: git fetch --all
- name: Git-checkout
run: git checkout master
- name: Git-merge
run: git merge upstream/master
- name: Merge master
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: nightly-build
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Merge master
uses: devmasx/merge-branch@master
with:
type: now
from_branch: master
target_branch: nightly-build
github_token: ${{ secrets.GITHUB_TOKEN }}