Open
Description
actionlint v1.7.7
Ran 5 Jun 2025 on ubuntu-latest runner
Actionlint did not find a problem with this but when the step ran, I got this error:
/home/runner/work/_temp/fa8d98c2-8f89-436c-849d-7d8e6188b4b0.sh: line 22: syntax error: unexpected end of file
There are 21 lines in the following script as part of the run step.
I had this step in my workflow where you will notice the 'fi' on the last 'if' is missing:
- name: parse 3rd result - library sources jar
id: coordinate_0_2
run: |
# parse the third result
# shellcheck disable=SC2206
IFS=":" read -ra coordinates <<< "$ARTIFACT_COORDINATES_0_2"
echo "theGroupId=${coordinates[0]}" >> "$GITHUB_OUTPUT"
echo "theArtifactId=${coordinates[1]}" >> "$GITHUB_OUTPUT"
echo "theVersion=${coordinates[2]}" >> "$GITHUB_OUTPUT"
echo "theClassifier=${coordinates[3]}" >> "$GITHUB_OUTPUT"
echo "thePackaging=${coordinates[4]}" >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
if [[ "${coordinates[1]}" != *"library" ]]; then
echo "ERROR: Expected artifactId to be '*library', but got '${coordinates[1]}'"
exit 1
fi
if [[ "${coordinates[3]}" != "sources" ]]; then
echo "ERROR: Expected classifier to be 'sources', but got '${coordinates[3]}'"
exit 1
fi
if [[ "${coordinates[4]}" != "jar" ]]; then
echo "ERROR: Expected packaging to be 'jar', but got '${coordinates[4]}'"
exit 1
The ENV variable value is shown here with my company changed to 'my-company':
ARTIFACT_COORDINATES_0_2: com.my-company.cicd:test-maven-action-multi-library:1.1-pull_request-202506051521:sources:jar
Metadata
Metadata
Assignees
Labels
No labels