Skip to content

Commit

Permalink
Fixed renovate checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Jul 30, 2024
1 parent 70ff034 commit 7f4cb18
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/renovate-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,33 @@ name: Renovate Checks
on:
push:
branches:
- "**"
- "renovate/**"

jobs:
build:
name: Check Snapshot
runs-on: ubuntu-latest
steps:
- name: Determine if branch starts with renovate/
id: check_branch
run: |
if [[ "${GITHUB_REF##*/}" == renovate/* ]]; then
echo "should_skip=false" >> $GITHUB_ENV
else
echo "should_skip=true" >> $GITHUB_ENV
fi
- name: Checkout Main
uses: actions/checkout@v4
if: ${{ env.should_skip == 'false' }}
with:
ref: main
path: repo

- name: Install Dependencies in Main
if: ${{ env.should_skip == 'false' }}
run: (cd repo && npm install)

- name: Create Snapshot In Main
if: ${{ env.should_skip == 'false' }}
run: (cd repo && npx tt-cli take-snapshot ./snap.md)

- name: Copy Snapshot To Outer Directory
if: ${{ env.should_skip == 'false' }}
run: mv repo/snap.md ./snap.md

- name: Delete Main Directory
if: ${{ env.should_skip == 'false' }}
run: rm -rf repo

- name: Checkout Branch
if: ${{ env.should_skip == 'false' }}
uses: actions/checkout@v4
with:
path: repo

- name: Install Dependencies in Branch
if: ${{ env.should_skip == 'false' }}
run: (cd repo && npm install)

- name: Move Snapshot To Branch
if: ${{ env.should_skip == 'false' }}
run: mv ./snap.md repo/snap.md

- name: Compare Snapshot In Branch
if: ${{ env.should_skip == 'false' }}
run: (cd repo && npx tt-cli compare-snapshot ./snap.md)

0 comments on commit 7f4cb18

Please sign in to comment.