Skip to content

Commit

Permalink
fixup! Add support for custom crave.yaml from secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
sounddrill31 committed Mar 23, 2024
1 parent 1ab7cec commit 3df7329
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
cp crave.yaml $PROJECTFOLDER/.repo/manifests
echo "No Custom Configuration Found, Using Template!"
else
touch $PROJECTFOLDER/.repo/manifests/crave.yaml
touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true
echo "${{ secrets.CUSTOM_YAML }}" > $PROJECTFOLDER/.repo/manifests/crave.yaml
echo "Custom Configuration Found!"
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ jobs:
cp crave.yaml $PROJECTFOLDER/.repo/manifests
echo "No Custom Configuration Found, Using Template!"
else
touch $PROJECTFOLDER/.repo/manifests/crave.yaml
touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true
echo "${{ secrets.CUSTOM_YAML }}" > $PROJECTFOLDER/.repo/manifests/crave.yaml
echo "Custom Configuration Found!"
fi
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/twrp-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,14 @@ jobs:
rm -rf ${PWD}/crave.conf.sample
cp crave.conf $PROJECTFOLDER
fi
cp crave.yaml.twrp.legacy $PROJECTFOLDER/.repo/manifests/crave.yaml
if [[ -z "${{ secrets.CUSTOM_YAML }}" ]]; then
cp crave.yaml.twrp.legacy $PROJECTFOLDER/.repo/manifests
echo "No Custom Configuration Found, Using Template!"
else
touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true
echo "${{ secrets.CUSTOM_YAML }}" > $PROJECTFOLDER/.repo/manifests/crave.yaml
echo "Custom Configuration Found!"
fi
env:
CRAVE_USERNAME: ${{ secrets.CRAVE_USERNAME }}
CRAVE_TOKEN: ${{ secrets.CRAVE_TOKEN }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/twrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,14 @@ jobs:
rm -rf ${PWD}/crave.conf.sample
cp crave.conf $PROJECTFOLDER
fi
cp crave.yaml.twrp $PROJECTFOLDER/.repo/manifests/crave.yaml
if [[ -z "${{ secrets.CUSTOM_YAML }}" ]]; then
cp crave.yaml.twrp $PROJECTFOLDER/.repo/manifests
echo "No Custom Configuration Found, Using Template!"
else
touch $PROJECTFOLDER/.repo/manifests/crave.yaml || true
echo "${{ secrets.CUSTOM_YAML }}" > $PROJECTFOLDER/.repo/manifests/crave.yaml
echo "Custom Configuration Found!"
fi
env:
CRAVE_USERNAME: ${{ secrets.CRAVE_USERNAME }}
Expand Down

0 comments on commit 3df7329

Please sign in to comment.