Skip to content

Update Repository

Update Repository #9

Workflow file for this run

name: Update Repository
# IMPORTANT: Only run on main/master branch.
on:
workflow_call:
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout user repo
uses: actions/checkout@v2
path: user_repo

Check failure on line 13 in .github/workflows/update_repo.yaml

View workflow run for this annotation

GitHub Actions / Update Repository

Invalid workflow file

The workflow is not valid. .github/workflows/update_repo.yaml (Line: 13, Col: 9): Unexpected value 'path'
- name: Install Dart
uses: dart-lang/setup-dart@v1
- name: Dart SDK Version
run: dart --version
- name: Prepare Codelessly Script Runner
run: |
rm -rf codelessly_script_runner
git clone https://github.com/Codelessly/codelessly_script_runner.git --single-branch
cd codelessly_script_runner
dart pub get
- name: Clone Latest Template
run: |
rm -rf codelessly_starter_brick
git clone https://github.com/Codelessly/codelessly_starter_brick.git --single-branch
- name: Run script
run: dart codelessly_script_runner/bin/main.dart codelessly_starter_brick/__brick__ ${{ secrets.CODELESSLY_PROJECT_CONFIG }}
- name: Commit and push changes
run: |
cd codelessly_starter_brick/__brick__
git init
git checkout -b main
git remote add origin https://github.repository_owner:${{ secrets.CODELESSLY_APP_ACCESS_TOKEN }}@github.com/${{ github.repository }}.git
git config user.name Codelessly
git config user.email codelessly@gmail.com
git add .
git commit -m "Update to latest template"
git push --force origin ${{ github.ref_name }}
- name: Finish
run: echo "Finished"