mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-08-06 17:04:22 +02:00
`::set-env::` and `::add-path::` let a step rewrite the environment of every later step from its own output, which the runner honoured silently. They are now refused, as GitHub has done since 2020, and `ACTIONS_ALLOW_UNSECURE_COMMANDS` opts back in per step or job. Support for that variable is new here too, and is the only opt-in, matching GitHub rather than adding a runner config key on top. Annotations keep their source location: Gitea has no annotation store and its web UI strips command properties, so `::error file=main.go,line=12::msg` is rendered as `::error::main.go:12: msg`. `DEVELOPMENT.md` writes down the log line encoding rules this relies on. --------- Co-authored-by: silverwind <me@silverwind.io> Reviewed-on: https://gitea.com/gitea/runner/pulls/1109 Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com> Co-authored-by: bircni <bircni@icloud.com>
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
on: push
|
|
jobs:
|
|
_:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
|
MYGLOBALENV3: myglobalval3
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
echo MYGLOBALENV1=myglobalval1 > $GITHUB_ENV
|
|
echo "::set-env name=MYGLOBALENV2::myglobalval2"
|
|
- uses: ./actions/script
|
|
with:
|
|
main: |
|
|
env
|
|
[[ "$MYGLOBALENV1" = "${{ env.MYGLOBALENV1 }}" ]]
|
|
[[ "$MYGLOBALENV1" = "${{ env.MYGLOBALENV1ALIAS }}" ]]
|
|
[[ "$MYGLOBALENV1" = "$MYGLOBALENV1ALIAS" ]]
|
|
[[ "$MYGLOBALENV2" = "${{ env.MYGLOBALENV2 }}" ]]
|
|
[[ "$MYGLOBALENV2" = "${{ env.MYGLOBALENV2ALIAS }}" ]]
|
|
[[ "$MYGLOBALENV2" = "$MYGLOBALENV2ALIAS" ]]
|
|
[[ "$MYGLOBALENV3" = "${{ env.MYGLOBALENV3 }}" ]]
|
|
[[ "$MYGLOBALENV3" = "${{ env.MYGLOBALENV3ALIAS }}" ]]
|
|
[[ "$MYGLOBALENV3" = "$MYGLOBALENV3ALIAS" ]]
|
|
env:
|
|
MYGLOBALENV1ALIAS: ${{ env.MYGLOBALENV1 }}
|
|
MYGLOBALENV2ALIAS: ${{ env.MYGLOBALENV2 }}
|
|
MYGLOBALENV3ALIAS: ${{ env.MYGLOBALENV3 }} |