Giter Club home page Giter Club logo

Comments (3)

uraimo avatar uraimo commented on May 27, 2024

Hi, please upgrade to 2.1.1 and let me know if everything works as expected, thanks!

from run-on-arch-action.

marceltaeumel avatar marceltaeumel commented on May 27, 2024

It's not yet working. I did a small test:

jobs:
  test-github-env:
    steps:
      - uses: uraimo/[email protected]
        with: 
          arch: armv6
          distro: buster
          run: echo "FOO=42" >> $GITHUB_ENV
      - run: echo $FOO

While the variable is set to point to the correct "kind of " file, that file was apparently not mapped into the container or it already changed because of multiple shell invocations. Its UUID suffix indicates its temporary nature:

/home/runner/work/_actions/uraimo/run-on-arch-action/v2.1.1/src/run-on-arch-commands.sh: line 5: /home/runner/work/_temp/_runner_file_commands/set_env_e40c0415-7014-4b2b-8d23-2417768e307e: No such file or directory
Error: The process '/home/runner/work/_actions/uraimo/run-on-arch-action/v2.1.1/src/run-on-arch.sh' failed with exit code 1

Now I wonder whether it is possible to forward $GITHUB_ENV at some later point in the scripts. I did some more tests that show the volatile nature of $GITHUB_ENV. The following steps were executed in order in a single job:

  1. Regular bash script; echo "GITHUB_ENV=$GITHUB_ENV"

    GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6718de84-a08e-45fa-b855-24040844fc12

  2. Regular bash script; echo "GITHUB_ENV=$GITHUB_ENV"

    GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_95b47c92-f8a9-4636-a993-f8955c580597

  3. Install script (run-on-arch); echo "GITHUB_ENV=$GITHUB_ENV"

    /root/run-on-arch-install.sh: line 5: GITHUB_ENV: unbound variable

  4. Setup script (run-on-arch); echo "GITHUB_ENV=$GITHUB_ENV"

    GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_63cda160-76bb-41c3-b532-04793d73c622

  5. Run script (run-on-arch); echo "GITHUB_ENV=$GITHUB_ENV"

    GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_63cda160-76bb-41c3-b532-04793d73c622

  6. Regular bash script; echo "GITHUB_ENV=$GITHUB_ENV"

    GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_ae2c0031-c7ce-4ebb-891e-70f8d703f65c

I am not sure how to proceed from here. I think you would need to rebind $GITHUB_ENV again before running the "setup script" and again before running the "run script".

from run-on-arch-action.

tinmarino avatar tinmarino commented on May 27, 2024

Hi,

At @marceltaeumel, thank you for the excellent report.
At @uraimo, very nice github action, thank you very much.

At all:
I fixed it here thank to your list of path.

          dockerRunArgs: |
            --volume /home/runner/work/_temp:/home/runner/work/_temp

Bye.

from run-on-arch-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.