Skip to content

Check Version

Check Version #2

name: Check Version
on:
schedule:
# Schedule every 12 hours
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current version
run: |
echo "currentVersion=$(grep -m1 'version:' pubspec.yaml | awk '{print $2}')" >> $GITHUB_ENV
- name: print current version
run: |
echo "Current Version: ${{ env.currentVersion }}"
- name: Clone codelessly_starter_brick
run: |
rm -rf codelessly_starter_brick
git clone https://github.com/Codelessly/codelessly_starter_brick.git --single-branch
- name: Get Latest Version
run: |
echo "starterVersion=$(grep -m1 'version:' codelessly_starter_brick/__brick__/pubspec.yaml | awk '{print $2}')" >> $GITHUB_ENV
- name: print version
run: |
echo "Starter Version: ${{ env.starterVersion }}"
- name: Compare versions
run: |
if [ "${{ env.currentVersion }}" != "${{ env.starterVersion }}" ]; then
echo "Versions are different"
echo "update=true" >> $GITHUB_ENV
else
echo "Versions are the same"
echo "update=false" >> $GITHUB_ENV
fi
- name: print update
run: |
echo "Should Update: ${{ env.update }}"
- name: Trigger Update
if: ${{ env.update == 'true' }}
uses: ${{ github.repository }}/.github/workflows/update_repo.yml@main

Check failure on line 44 in .github/workflows/check_version.yaml

View workflow run for this annotation

GitHub Actions / Check Version

Invalid workflow file

The workflow is not valid. .github/workflows/check_version.yaml (Line: 44, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.repository