Skip to content

Commit

Permalink
Update action.yml to handle undefined yaml-path arg
Browse files Browse the repository at this point in the history
  • Loading branch information
rudra-iitm committed Dec 2, 2024
1 parent 1411435 commit b14f714
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ inputs:
yaml-path:
description: 'Path to the YAML file'
required: false
default: 'None'

# Outputs generated by running this action.
outputs:
Expand Down Expand Up @@ -53,15 +52,15 @@ runs:
- name: run updatesnapyaml
id: updatesnapyaml
run: |
./desktop-snaps/updatesnap/updatesnapyaml.py --github-user $GITHUB_USER --github-token $GITHUB_TOKEN --version-schema $VERSION_SCHEMA --rock-version-schema $ROCK_VERSION_SCHEMA --yaml-path $YAML_PATH https://github.com/${{ github.repository }}
./desktop-snaps/updatesnap/updatesnapyaml.py --github-user $GITHUB_USER --github-token $GITHUB_TOKEN --version-schema $VERSION_SCHEMA --rock-version-schema $ROCK_VERSION_SCHEMA ${YAML_PATH:+--yaml-path $YAML_PATH} https://github.com/${{ github.repository }}
# Make sure to put the updated snapcraft.yaml file in the right location if it lives in a snap directory
if [ -f version_file ]; then
echo "IS_VERSION_CHANGE=true" >> $GITHUB_ENV
rm version_file
fi
if [ -f output_file ]; then
echo "IS_CHANGE=true" >> $GITHUB_ENV
if [ "$YAML_PATH" != 'None' ]; then
if [ -n "$YAML_PATH" ]; then
mv output_file $YAML_PATH
elif [ -f rockcraft.yaml ]; then
mv output_file rockcraft.yaml
Expand Down

0 comments on commit b14f714

Please sign in to comment.