Skip to content

Commit

Permalink
fix: add file_check
Browse files Browse the repository at this point in the history
Signed-off-by: Lou DeGenaro <[email protected]>
  • Loading branch information
degenaro committed Nov 27, 2023
1 parent b089b3b commit 5f8d5ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,31 @@ jobs:
runs-on: ubuntu-latest
needs: release
steps:
- name: Check for initialized
id: file_check
run: |
if ls -l catalogs | wc -l != 0; then
echo "check_result=true" >> $GITHUB_OUTPUT
else
echo "check_result=false" >> $GITHUB_OUTPUT
fi
- name: Clone branch
if: steps.file_check.outputs.check_result == 'true'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main
token: ${{ secrets.GIT_TOKEN }}
- name: Clone downstream repo
if: steps.file_check.outputs.check_result == 'true'
uses: actions/checkout@v2
with:
repository: my-repo-base/my-profile
path: './my-profile'
token: ${{ secrets.GIT_TOKEN }}
fetch-depth: 0
- name: Update profiles
if: steps.file_check.outputs.check_result == 'true'
run: bash scripts/automation/update_downstream.sh
env:
GH_TOKEN: ${{ secrets.GIT_TOKEN }}
Expand Down

0 comments on commit 5f8d5ab

Please sign in to comment.