Skip to content

Conversation

@webdevred
Copy link
Collaborator

@webdevred webdevred commented Nov 22, 2025

This refactor relocates most inline Bash from action.yml into dedicated scripts, making the action cleaner, safer, and easier to maintain.

Key Benefits

Cleaner action definition

  • action.yml is shorter and easier to read.
  • Inputs are simply forwarded to scripts instead of mixed with long Bash blocks.

Editor experience:

  • Editors can now provide syntax highlighting
  • shfmt and shellcheck can suggest now improvements

@webdevred webdevred requested a review from Kleidukos November 22, 2025 13:08
@webdevred
Copy link
Collaborator Author

Both ci.yml and release.yml use something like this to consolidate the artifacts into a director. Maybe this could be separated out into a file as well?

        set -eu
        echo "=== ./out contents ==="
        ls -lhR ./out || true
        mkdir -p release_files
        for p in ./out/*; do
        if [ -d "$p" ]; then
          artname=$(basename "$p")
          for f in "$p"/*; do
            if [ -f "$f" ]; then
              case "$artname" in
                *Windows*|*windows*)
                  cp "$f" "get-tested.exe"
                  zip "release_files/${artname}.zip" "get-tested.exe"
                  rm "get-tested.exe"
                  ;;
                *Linux*|*linux*|*macOS*|*macos*)
                  cp "$f" "get-tested"
                  tar -czf "release_files/${artname}.tar.gz" "get-tested"
                  rm "get-tested"
                  ;;
                *)
                  base=$(basename "$f")
                  cp "$f" "release_files/${artname}-${base}"
                  ;;
              esac
            fi
          done
        elif [ -f "$p" ]; then
          base=$(basename "$p")
          cp "$p" "release_files/${base}"
        fi
        done
        echo "=== release_files contents ==="
        ls -lh release_files || true

I would be happy to receive feedback on where I placed the scripts, I just put where they are now to get started with this.

@webdevred
Copy link
Collaborator Author

webdevred commented Nov 22, 2025

bild I am getting this error because I am running the tests on a fork and it cant get permissions then. Maybe the uploading test results should be disabled for forks?

@webdevred
Copy link
Collaborator Author

webdevred commented Nov 22, 2025

So I tried using this in jbeam_edit and I am getting a error since in jbeam_edit the new scripts do not exist in the workspace. I will try to look into how to make this work.

Edit: So my current guess is that it may actually be hard to do this without creating Dockerfile and make it into a container action. I believe that is doable for me but its not what I had in mind initially and I do not know if we want to do that.

https://docs.github.com/en/actions/tutorials/use-containerized-services/create-a-docker-container-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant