Open marceltaeumel opened 3 years ago
Hi, please upgrade to 2.1.1 and let me know if everything works as expected, thanks!
It's not yet working. I did a small test:
jobs:
test-github-env:
steps:
- uses: uraimo/run-on-arch-action@v2.1.1
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:
echo "GITHUB_ENV=$GITHUB_ENV"
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_6718de84-a08e-45fa-b855-24040844fc12
echo "GITHUB_ENV=$GITHUB_ENV"
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_95b47c92-f8a9-4636-a993-f8955c580597
echo "GITHUB_ENV=$GITHUB_ENV"
/root/run-on-arch-install.sh: line 5: GITHUB_ENV: unbound variable
echo "GITHUB_ENV=$GITHUB_ENV"
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_63cda160-76bb-41c3-b532-04793d73c622
echo "GITHUB_ENV=$GITHUB_ENV"
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_63cda160-76bb-41c3-b532-04793d73c622
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".
At the moment, I have to do this to get output out of the container:
Would it be possible to support
$GITHUB_ENV
somehow?Without
$GITHUB_ENV
, I have to manually repack variables for follow-up scripts like this:So that I can then call scripts like this: