Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve autoupdate round 4 #39

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,15 @@ jobs:
echo "Running autoupdate command..."
cd "$REPO"
# This may fail
# To get an exit code of 1 even with tee:
set -o pipefail
planemo autoupdate . --skiplist "${{ github.workspace }}/autoupdate/${{ matrix.upstream_repo_owner }}_${{ matrix.upstream_repo_name }}_skip_list" 2>&1 1> "${{ github.workspace }}/autoupdate.log" | tee "${{ github.workspace }}/autoupdate.err" || errors="${errors}\nCannot autoupdate $REPO, last line of stderr is\n$(tail -n 1 "${{ github.workspace }}/autoupdate.err")"
# Restore
set +o pipefail
# Waiting for https://github.com/galaxyproject/planemo/issues/1478 to be solved
if [[ "$(tail -n 1 "${{ github.workspace }}/autoupdate.log")" = "Could not update"* ]]; then
errors="${errors}\n$(tail -n 1 "${{ github.workspace }}/autoupdate.log")\n$(tail -n 1 "${{ github.workspace }}/autoupdate.err")"
fi
rm -f tool_test_output.* tools.yml
cd -
# Check if it changed something
Expand All @@ -109,7 +117,7 @@ jobs:
;;
*)
TITLE=$(python3 "${{ github.workspace }}/autoupdate/pr_text.py" --repo "$REPO" --log "${{ github.workspace }}/autoupdate.log" --shed "$REPO/.shed.yml" --out "${{ github.workspace }}/body.txt")
FILE_TO_CHECK=
FILE_TO_CHECK=${REPO}
;;
esac
# Check if there is a branch/PR that already exists
Expand Down Expand Up @@ -162,7 +170,7 @@ jobs:
fi
fi
echo "There are changes"
if [ "$PR_EXISTS" -eq 1 ]; then
if [ "$DIFF_BRANCH" = "origin/$REPO" ] ; then
# Check if the last commit of the existing branch was manual
LAST_AUTHOR=$(git log -1 --pretty=format:'%an' $DIFF_BRANCH)
if [ "$LAST_AUTHOR" != "planemo-autoupdate" ]; then
Expand Down