Skip to content

Commit

Permalink
improved fuel upload action (#11)
Browse files Browse the repository at this point in the history
Signed-off-by: frederik <[email protected]>
  • Loading branch information
frede791 committed Dec 13, 2023
1 parent 0049751 commit 349f946
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Accept OSRF software
run: |
Expand Down
5 changes: 2 additions & 3 deletions fuel_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ prev_model=

while IFS= read -r line; do

type=$(echo "$line" | awk -F'/' '{print $1}')
type=$(echo "$type" | awk -F' ' '{print $2}')
type=$(echo "$line" | awk -F'/' '{print $1}' | awk -F' ' '{print $2}')
model=$(echo "$line" | awk -F'/' '{print $2}')

# Delete the model from if it exists and is encountered for the first time.
if [[ $model != $prev_model ]]; then
if [[ $model != $prev_model ]] && ([[ $type == "models" ]] || [[ $type == "worlds" ]]); then
echo "Trying to delete $model from fuel server"
gz fuel delete --header 'Private-token: $FUEL_TOKEN' --url https://fuel.gazebosim.org/1.0/PX4/$type/$model -o PX4

Expand Down

0 comments on commit 349f946

Please sign in to comment.