Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package act for openSUSE:Factory checked in at 2022-08-10 17:14:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/act (Old) and /work/SRC/openSUSE:Factory/.act.new.1521 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "act" Wed Aug 10 17:14:39 2022 rev:3 rq:994226 version:0.2.30 Changes: -------- --- /work/SRC/openSUSE:Factory/act/act.changes 2022-07-09 17:05:23.480919652 +0200 +++ /work/SRC/openSUSE:Factory/.act.new.1521/act.changes 2022-08-10 17:15:45.230092281 +0200 @@ -1,0 +2,20 @@ +Wed Aug 10 03:15:57 UTC 2022 - jay...@gmail.com + +- Update to version 0.2.30: + * fix: ensure all post steps are executed (#1286) + * walk submodule path instead of dir name (#1282) + * fix: add parent step id in composite action step id (#1268) + * Made env interpolated instead of evaluated. (#1222) + * build(deps): bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0 (#1273) + * Update README.md (#1260) + * lint: add ReadHeaderTimeout (#1277) + * fix: the number in the github event is of type number (#1252) + * only perform chown operation for non root users (#1250) + * fix: allow TimeoutMinutes to be expression in Jobs (#1247) + * fix: use docker images from dockerhub (#1249) + * Improve --eventpath example command (#1243) + * Improve docs for events inputs (#1238) + * build(deps): bump github.com/rhysd/actionlint from 1.6.14 to 1.6.15 (#1239) + * build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#1240) + +------------------------------------------------------------------- Old: ---- act-0.2.29.tar.xz New: ---- act-0.2.30.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ act.spec ++++++ --- /var/tmp/diff_new_pack.gEoE4f/_old 2022-08-10 17:15:46.418095382 +0200 +++ /var/tmp/diff_new_pack.gEoE4f/_new 2022-08-10 17:15:46.422095393 +0200 @@ -24,7 +24,7 @@ %global provider_prefix %{provider}.%{provider_tld}/%{project} %global import_path %{provider_prefix}/%{repo} Name: act -Version: 0.2.29 +Version: 0.2.30 Release: 0 Summary: Run your GitHub Actions locally License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.gEoE4f/_old 2022-08-10 17:15:46.462095497 +0200 +++ /var/tmp/diff_new_pack.gEoE4f/_new 2022-08-10 17:15:46.466095508 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/nektos/act.git</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v0.2.29</param> + <param name="revision">v0.2.30</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.gEoE4f/_old 2022-08-10 17:15:46.486095560 +0200 +++ /var/tmp/diff_new_pack.gEoE4f/_new 2022-08-10 17:15:46.490095571 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/nektos/act.git</param> - <param name="changesrevision">9499612b5818774c5c6d73fbf2596ed464b7b01d</param></service></servicedata> + <param name="changesrevision">3364f95569d8a39d440b18af69d29421fcc77b55</param></service></servicedata> (No newline at EOF) ++++++ act-0.2.29.tar.xz -> act-0.2.30.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/IMAGES.md new/act-0.2.30/IMAGES.md --- old/act-0.2.29/IMAGES.md 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/IMAGES.md 2022-07-29 21:43:24.000000000 +0200 @@ -19,10 +19,10 @@ | Image | GitHub Repository | | -------------------------------------------------------------------- | ------------------------------------------------------------- | -| [`ghcr.io/catthehacker/ubuntu:act-latest`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | -| [`ghcr.io/catthehacker/ubuntu:act-22.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | -| [`ghcr.io/catthehacker/ubuntu:act-20.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | -| [`ghcr.io/catthehacker/ubuntu:act-18.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | +| [`catthehacker/ubuntu:act-latest`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | +| [`catthehacker/ubuntu:act-22.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | +| [`catthehacker/ubuntu:act-20.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | +| [`catthehacker/ubuntu:act-18.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/docker-images`][gh/catthehacker/docker_images] | ## Images based on [`actions/virtual-environments`][gh/actions/virtual-environments] @@ -36,9 +36,9 @@ | Image | GitHub Repository | | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| [`ghcr.io/catthehacker/ubuntu:full-latest`][ghcr/catthehacker/ubuntu] | [`catthehacker/virtual-environments-fork`][gh/catthehacker/virtual-environments-fork] | -| [`ghcr.io/catthehacker/ubuntu:full-20.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/virtual-environments-fork`][gh/catthehacker/virtual-environments-fork] | -| [`ghcr.io/catthehacker/ubuntu:full-18.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/virtual-environments-fork`][gh/catthehacker/virtual-environments-fork] | +| [`catthehacker/ubuntu:full-latest`][ghcr/catthehacker/ubuntu] | [`catthehacker/virtual-environments-fork`][gh/catthehacker/virtual-environments-fork] | +| [`catthehacker/ubuntu:full-20.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/virtual-environments-fork`][gh/catthehacker/virtual-environments-fork] | +| [`catthehacker/ubuntu:full-18.04`][ghcr/catthehacker/ubuntu] | [`catthehacker/virtual-environments-fork`][gh/catthehacker/virtual-environments-fork] | Feel free to make a pull request with your image added here diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/README.md new/act-0.2.30/README.md --- old/act-0.2.29/README.md 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/README.md 2022-07-29 21:43:24.000000000 +0200 @@ -201,7 +201,7 @@ ## `GITHUB_TOKEN` -Github [automatically provides](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret) a `GITHUB_TOKEN` secret when running workflows inside Github. +GitHub [automatically provides](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret) a `GITHUB_TOKEN` secret when running workflows inside GitHub. If your workflow depends on this token, you need to create a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and pass it to `act` as a secret: @@ -254,10 +254,10 @@ | GitHub Runner | Micro Docker Image | Medium Docker Image | Large Docker Image | | --------------- | -------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------- | -| `ubuntu-latest` | [`node:16-buster-slim`][micro] | [`ghcr.io/catthehacker/ubuntu:act-latest`][docker_images] | [`ghcr.io/catthehacker/ubuntu:full-latest`][docker_images] | -| `ubuntu-22.04` | [`node:16-bullseye-slim`][micro] | [`ghcr.io/catthehacker/ubuntu:act-22.04`][docker_images] | `unavailable` | -| `ubuntu-20.04` | [`node:16-buster-slim`][micro] | [`ghcr.io/catthehacker/ubuntu:act-20.04`][docker_images] | [`ghcr.io/catthehacker/ubuntu:full-20.04`][docker_images] | -| `ubuntu-18.04` | [`node:16-buster-slim`][micro] | [`ghcr.io/catthehacker/ubuntu:act-18.04`][docker_images] | [`ghcr.io/catthehacker/ubuntu:full-18.04`][docker_images] | +| `ubuntu-latest` | [`node:16-buster-slim`][micro] | [`catthehacker/ubuntu:act-latest`][docker_images] | [`catthehacker/ubuntu:full-latest`][docker_images] | +| `ubuntu-22.04` | [`node:16-bullseye-slim`][micro] | [`catthehacker/ubuntu:act-22.04`][docker_images] | `unavailable` | +| `ubuntu-20.04` | [`node:16-buster-slim`][micro] | [`catthehacker/ubuntu:act-20.04`][docker_images] | [`catthehacker/ubuntu:full-20.04`][docker_images] | +| `ubuntu-18.04` | [`node:16-buster-slim`][micro] | [`catthehacker/ubuntu:act-18.04`][docker_images] | [`catthehacker/ubuntu:full-18.04`][docker_images] | [micro]: https://hub.docker.com/_/buildpack-deps [docker_images]: https://github.com/catthehacker/docker_images @@ -281,7 +281,7 @@ :warning: :elephant: `*** WARNING - this image is >18GB ????***` -- [`ghcr.io/catthehacker/ubuntu:full-*`](https://github.com/catthehacker/docker_images/pkgs/container/ubuntu) - built from Packer template provided by GitHub, see [catthehacker/virtual-environments-fork](https://github.com/catthehacker/virtual-environments-fork) or [catthehacker/docker_images](https://github.com/catthehacker/docker_images) for more information +- [`catthehacker/ubuntu:full-*`](https://github.com/catthehacker/docker_images/pkgs/container/ubuntu) - built from Packer template provided by GitHub, see [catthehacker/virtual-environments-fork](https://github.com/catthehacker/virtual-environments-fork) or [catthehacker/docker_images](https://github.com/catthehacker/docker_images) for more information ## Use an alternative runner image @@ -365,11 +365,54 @@ ``` ```sh -act -e pull-request.json +act pull_request -e pull-request.json ``` Act will properly provide `github.head_ref` and `github.base_ref` to the action as expected. +## Pass Inputs to Manually Triggered Workflows + +Example workflow file + +```yaml +on: + workflow_dispatch: + inputs: + NAME: + description: "A random input name for the workflow" + type: string + SOME_VALUE: + description: "Some other input to pass" + type: string + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + steps: + - name: Test with inputs + run: | + echo "Hello ${{ github.event.inputs.NAME }} and ${{ github.event.inputs.SOME_VALUE }}!" +``` + +Example JSON payload file conveniently named `payload.json` + +```json +{ + "inputs": { + "NAME": "Manual Workflow", + "SOME_VALUE": "ABC" + } +} +``` + +Command for triggering the workflow + +```sh +act workflow_dispatch -e payload.json +``` + # GitHub Enterprise Act supports using and authenticating against private GitHub Enterprise servers. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/cmd/root.go new/act-0.2.30/cmd/root.go --- old/act-0.2.29/cmd/root.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/cmd/root.go 2022-07-29 21:43:24.000000000 +0200 @@ -443,9 +443,9 @@ var option string switch answer { case "Large": - option = "-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:full-latest\n-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:full-20.04\n-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:full-18.04\n" + option = "-P ubuntu-latest=catthehacker/ubuntu:full-latest\n-P ubuntu-latest=catthehacker/ubuntu:full-20.04\n-P ubuntu-18.04=catthehacker/ubuntu:full-18.04\n" case "Medium": - option = "-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest\n-P ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04\n-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04\n-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04\n" + option = "-P ubuntu-latest=catthehacker/ubuntu:act-latest\n-P ubuntu-22.04=catthehacker/ubuntu:act-22.04\n-P ubuntu-20.04=catthehacker/ubuntu:act-20.04\n-P ubuntu-18.04=catthehacker/ubuntu:act-18.04\n" case "Micro": option = "-P ubuntu-latest=node:16-buster-slim\n-P -P ubuntu-22.04=node:16-bullseye-slim\n ubuntu-20.04=node:16-buster-slim\n-P ubuntu-18.04=node:16-buster-slim\n" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/go.mod new/act-0.2.30/go.mod --- old/act-0.2.29/go.mod 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/go.mod 2022-07-29 21:43:24.000000000 +0200 @@ -20,12 +20,12 @@ github.com/moby/buildkit v0.10.3 github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 github.com/opencontainers/selinux v1.10.1 - github.com/rhysd/actionlint v1.6.14 + github.com/rhysd/actionlint v1.6.15 github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 - github.com/sirupsen/logrus v1.8.1 + github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.5 + github.com/stretchr/testify v1.8.0 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 gopkg.in/yaml.v3 v3.0.1 ) @@ -68,7 +68,7 @@ golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 // indirect golang.org/x/net v0.0.0-20220403103023-749bd193bc2b // indirect golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect golang.org/x/text v0.3.7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/go.sum new/act-0.2.30/go.sum --- old/act-0.2.29/go.sum 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/go.sum 2022-07-29 21:43:24.000000000 +0200 @@ -647,8 +647,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rhysd/actionlint v1.6.14 h1:WMNjt9ztrmXrVdYdQHC+gEPYUUP1xmUIVoUBM2iCCuY= -github.com/rhysd/actionlint v1.6.14/go.mod h1:R4ZRjgsIrnsT1CPU/4MdiIBzfJgMKJFd4qqGUERI098= +github.com/rhysd/actionlint v1.6.15 h1:IxQIp10aVce77jNnoHye7NFka8/7CRBSvKXoMRGryXM= +github.com/rhysd/actionlint v1.6.15/go.mod h1:R4ZRjgsIrnsT1CPU/4MdiIBzfJgMKJFd4qqGUERI098= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= @@ -677,8 +677,9 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -714,8 +715,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.5 h1:s5PTfem8p8EbKQOctVV53k6jCJt3UX4IEJzwh+C324Q= -github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -951,8 +952,8 @@ golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/artifacts/server.go new/act-0.2.30/pkg/artifacts/server.go --- old/act-0.2.29/pkg/artifacts/server.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/artifacts/server.go 2022-07-29 21:43:24.000000000 +0200 @@ -12,6 +12,7 @@ "path" "path/filepath" "strings" + "time" "github.com/julienschmidt/httprouter" "github.com/nektos/act/pkg/common" @@ -277,7 +278,11 @@ downloads(router, fs) ip := common.GetOutboundIP().String() - server := &http.Server{Addr: fmt.Sprintf("%s:%s", ip, port), Handler: router} + server := &http.Server{ + Addr: fmt.Sprintf("%s:%s", ip, port), + ReadHeaderTimeout: 2 * time.Second, + Handler: router, + } // run server go func() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/container/docker_run.go new/act-0.2.30/pkg/container/docker_run.go --- old/act-0.2.29/pkg/container/docker_run.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/container/docker_run.go 2022-07-29 21:43:24.000000000 +0200 @@ -130,7 +130,9 @@ cr.tryReadGID(), func(ctx context.Context) error { // If this fails, then folders have wrong permissions on non root container - _ = cr.Exec([]string{"chown", "-R", fmt.Sprintf("%d:%d", cr.UID, cr.GID), cr.input.WorkingDir}, nil, "0", "")(ctx) + if cr.UID != 0 || cr.GID != 0 { + _ = cr.Exec([]string{"chown", "-R", fmt.Sprintf("%d:%d", cr.UID, cr.GID), cr.input.WorkingDir}, nil, "0", "")(ctx) + } return nil }, ).IfNot(common.Dryrun), @@ -165,7 +167,9 @@ cr.copyDir(destPath, srcPath, useGitIgnore), func(ctx context.Context) error { // If this fails, then folders have wrong permissions on non root container - _ = cr.Exec([]string{"chown", "-R", fmt.Sprintf("%d:%d", cr.UID, cr.GID), destPath}, nil, "0", "")(ctx) + if cr.UID != 0 || cr.GID != 0 { + _ = cr.Exec([]string{"chown", "-R", fmt.Sprintf("%d:%d", cr.UID, cr.GID), destPath}, nil, "0", "")(ctx) + } return nil }, ).IfNot(common.Dryrun) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/container/file_collector.go new/act-0.2.30/pkg/container/file_collector.go --- old/act-0.2.29/pkg/container/file_collector.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/container/file_collector.go 2022-07-29 21:43:24.000000000 +0200 @@ -143,7 +143,7 @@ } } if err == nil && entry.Mode == filemode.Submodule { - err = fc.Fs.Walk(fi.Name(), fc.collectFiles(ctx, split)) + err = fc.Fs.Walk(file, fc.collectFiles(ctx, split)) if err != nil { return err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/model/github_context.go new/act-0.2.30/pkg/model/github_context.go --- old/act-0.2.29/pkg/model/github_context.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/model/github_context.go 2022-07-29 21:43:24.000000000 +0200 @@ -98,7 +98,7 @@ ghc.Ref = ghc.BaseRef ghc.Sha = asString(nestedMapLookup(ghc.Event, "pull_request", "base", "sha")) case "pull_request", "pull_request_review", "pull_request_review_comment": - ghc.Ref = fmt.Sprintf("refs/pull/%s/merge", ghc.Event["number"]) + ghc.Ref = fmt.Sprintf("refs/pull/%.0f/merge", ghc.Event["number"]) case "deployment", "deployment_status": ghc.Ref = asString(nestedMapLookup(ghc.Event, "deployment", "ref")) ghc.Sha = asString(nestedMapLookup(ghc.Event, "deployment", "sha")) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/model/github_context_test.go new/act-0.2.30/pkg/model/github_context_test.go --- old/act-0.2.29/pkg/model/github_context_test.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/model/github_context_test.go 2022-07-29 21:43:24.000000000 +0200 @@ -46,7 +46,7 @@ { eventName: "pull_request", event: map[string]interface{}{ - "number": "1234", + "number": 1234., }, ref: "refs/pull/1234/merge", sha: "1234fakesha", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/model/workflow.go new/act-0.2.30/pkg/model/workflow.go --- old/act-0.2.29/pkg/model/workflow.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/model/workflow.go 2022-07-29 21:43:24.000000000 +0200 @@ -63,7 +63,7 @@ Env yaml.Node `yaml:"env"` If yaml.Node `yaml:"if"` Steps []*Step `yaml:"steps"` - TimeoutMinutes int64 `yaml:"timeout-minutes"` + TimeoutMinutes string `yaml:"timeout-minutes"` Services map[string]*ContainerSpec `yaml:"services"` Strategy *Strategy `yaml:"strategy"` RawContainer yaml.Node `yaml:"container"` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/action_composite.go new/act-0.2.30/pkg/runner/action_composite.go --- old/act-0.2.29/pkg/runner/action_composite.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/action_composite.go 2022-07-29 21:43:24.000000000 +0200 @@ -62,6 +62,7 @@ Env: env, Masks: parent.Masks, ExtraPath: parent.ExtraPath, + Parent: parent, } return compositerc @@ -137,11 +138,15 @@ } } - preSteps = append(preSteps, step.pre()) + stepID := step.getStepModel().ID + stepPre := rc.newCompositeCommandExecutor(step.pre()) + preSteps = append(preSteps, newCompositeStepLogExecutor(stepPre, stepID)) steps = append(steps, func(ctx context.Context) error { + ctx = WithCompositeStepLogger(ctx, stepID) logger := common.Logger(ctx) - err := step.main()(ctx) + err := rc.newCompositeCommandExecutor(step.main())(ctx) + if err != nil { logger.Errorf("%v", err) common.SetJobError(ctx, err) @@ -154,19 +159,23 @@ // run the post executor in reverse order if postExecutor != nil { - postExecutor = step.post().Finally(postExecutor) + stepPost := rc.newCompositeCommandExecutor(step.post()) + postExecutor = newCompositeStepLogExecutor(stepPost.Finally(postExecutor), stepID) } else { - postExecutor = step.post() + stepPost := rc.newCompositeCommandExecutor(step.post()) + postExecutor = newCompositeStepLogExecutor(stepPost, stepID) } } steps = append(steps, common.JobError) return &compositeSteps{ - pre: rc.newCompositeCommandExecutor(common.NewPipelineExecutor(preSteps...)), - main: rc.newCompositeCommandExecutor(func(ctx context.Context) error { + pre: func(ctx context.Context) error { + return common.NewPipelineExecutor(preSteps...)(common.WithJobErrorContainer(ctx)) + }, + main: func(ctx context.Context) error { return common.NewPipelineExecutor(steps...)(common.WithJobErrorContainer(ctx)) - }), - post: rc.newCompositeCommandExecutor(postExecutor), + }, + post: postExecutor, } } @@ -194,3 +203,19 @@ return executor(ctx) } } + +func newCompositeStepLogExecutor(runStep common.Executor, stepID string) common.Executor { + return func(ctx context.Context) error { + ctx = WithCompositeStepLogger(ctx, stepID) + logger := common.Logger(ctx) + err := runStep(ctx) + if err != nil { + logger.Errorf("%v", err) + common.SetJobError(ctx, err) + } else if ctx.Err() != nil { + logger.Errorf("%v", ctx.Err()) + common.SetJobError(ctx, ctx.Err()) + } + return nil + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/logger.go new/act-0.2.30/pkg/runner/logger.go --- old/act-0.2.29/pkg/runner/logger.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/logger.go 2022-07-29 21:43:24.000000000 +0200 @@ -96,10 +96,27 @@ return common.WithLogger(ctx, common.Logger(ctx).WithFields(logrus.Fields{}).WithContext(ctx)) } +func WithCompositeStepLogger(ctx context.Context, stepID string) context.Context { + val := common.Logger(ctx) + stepIDs := make([]string, 0) + + if logger, ok := val.(*logrus.Entry); ok { + if oldStepIDs, ok := logger.Data["stepID"].([]string); ok { + stepIDs = append(stepIDs, oldStepIDs...) + } + } + + stepIDs = append(stepIDs, stepID) + + return common.WithLogger(ctx, common.Logger(ctx).WithFields(logrus.Fields{ + "stepID": stepIDs, + }).WithContext(ctx)) +} + func withStepLogger(ctx context.Context, stepID string, stepName string, stageName string) context.Context { rtn := common.Logger(ctx).WithFields(logrus.Fields{ "step": stepName, - "stepID": stepID, + "stepID": []string{stepID}, "stage": stageName, }) return common.WithLogger(ctx, rtn) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/runner.go new/act-0.2.30/pkg/runner/runner.go --- old/act-0.2.29/pkg/runner/runner.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/runner.go 2022-07-29 21:43:24.000000000 +0200 @@ -14,7 +14,6 @@ "github.com/nektos/act/pkg/common" "github.com/nektos/act/pkg/container" - "github.com/nektos/act/pkg/exprparser" "github.com/nektos/act/pkg/model" ) @@ -165,10 +164,7 @@ // evaluate environment variables since they can contain // GitHub's special environment variables. for k, v := range rc.GetEnv() { - valueEval, err := rc.ExprEval.evaluate(ctx, v, exprparser.DefaultStatusCheckNone) - if err == nil { - rc.Env[k] = fmt.Sprintf("%v", valueEval) - } + rc.Env[k] = rc.ExprEval.Interpolate(ctx, v) } if len(rc.String()) > maxJobNameLen { maxJobNameLen = len(rc.String()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/runner_test.go new/act-0.2.30/pkg/runner/runner_test.go --- old/act-0.2.29/pkg/runner/runner_test.go 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/runner_test.go 2022-07-29 21:43:24.000000000 +0200 @@ -121,8 +121,8 @@ // Shells {workdir, "shells/defaults", "push", "", platforms}, // TODO: figure out why it fails - // {workdir, "shells/custom", "push", "", map[string]string{"ubuntu-latest": "ghcr.io/justingrote/act-pwsh:latest"}, }, // custom image with pwsh - {workdir, "shells/pwsh", "push", "", map[string]string{"ubuntu-latest": "ghcr.io/justingrote/act-pwsh:latest"}}, // custom image with pwsh + // {workdir, "shells/custom", "push", "", map[string]string{"ubuntu-latest": "catthehacker/ubuntu:pwsh-latest"}, }, // custom image with pwsh + {workdir, "shells/pwsh", "push", "", map[string]string{"ubuntu-latest": "catthehacker/ubuntu:pwsh-latest"}}, // custom image with pwsh {workdir, "shells/bash", "push", "", platforms}, {workdir, "shells/python", "push", "", map[string]string{"ubuntu-latest": "node:16-buster"}}, // slim doesn't have python {workdir, "shells/sh", "push", "", platforms}, @@ -158,7 +158,7 @@ {workdir, "container-hostname", "push", "", platforms}, {workdir, "remote-action-docker", "push", "", platforms}, {workdir, "remote-action-js", "push", "", platforms}, - {workdir, "remote-action-js", "push", "", map[string]string{"ubuntu-latest": "ghcr.io/catthehacker/ubuntu:runner-latest"}}, // Test if this works with non root container + {workdir, "remote-action-js", "push", "", map[string]string{"ubuntu-latest": "catthehacker/ubuntu:runner-latest"}}, // Test if this works with non root container {workdir, "matrix", "push", "", platforms}, {workdir, "matrix-include-exclude", "push", "", platforms}, {workdir, "commands", "push", "", platforms}, @@ -177,6 +177,8 @@ {workdir, "if-expressions", "push", "Job 'mytest' failed", platforms}, {workdir, "actions-environment-and-context-tests", "push", "", platforms}, {workdir, "uses-action-with-pre-and-post-step", "push", "", platforms}, + {workdir, "evalenv", "push", "", platforms}, + {workdir, "ensure-post-steps", "push", "Job 'second-post-step-should-fail' failed", platforms}, {"../model/testdata", "strategy", "push", "", platforms}, // TODO: move all testdata into pkg so we can validate it with planner and runner // {"testdata", "issue-228", "push", "", platforms, }, // TODO [igni]: Remove this once everything passes {"../model/testdata", "container-volumes", "push", "", platforms}, @@ -199,7 +201,7 @@ tables := []TestJobFileInfo{ // Shells {workdir, "shells/defaults", "push", "", platforms}, - {workdir, "shells/pwsh", "push", "", map[string]string{"ubuntu-latest": "ghcr.io/justingrote/act-pwsh:latest"}}, // custom image with pwsh + {workdir, "shells/pwsh", "push", "", map[string]string{"ubuntu-latest": "catthehacker/ubuntu:pwsh-latest"}}, // custom image with pwsh {workdir, "shells/bash", "push", "", platforms}, {workdir, "shells/python", "push", "", map[string]string{"ubuntu-latest": "node:16-buster"}}, // slim doesn't have python {workdir, "shells/sh", "push", "", platforms}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/action-composite/action.yml new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/action-composite/action.yml --- old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/action-composite/action.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/action-composite/action.yml 2022-07-29 21:43:24.000000000 +0200 @@ -0,0 +1,10 @@ +name: "action composite" +description: "action composite" +runs: + using: composite + steps: + # second post action should fail if executed (we do check on the exit code) + - uses: ./ensure-post-steps/action-post/ + with: + fail: "true" + - uses: ./ensure-post-steps/action-post/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/action-post/action.yml new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/action-post/action.yml --- old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/action-post/action.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/action-post/action.yml 2022-07-29 21:43:24.000000000 +0200 @@ -0,0 +1,11 @@ +name: "action post" +description: "action post" +inputs: + fail: + description: "true if this should fail" + required: false + default: "false" +runs: + using: node16 + main: "./main.js" + post: "./post.js" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/action-post/post.js new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/action-post/post.js --- old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/action-post/post.js 1970-01-01 01:00:00.000000000 +0100 +++ new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/action-post/post.js 2022-07-29 21:43:24.000000000 +0200 @@ -0,0 +1,3 @@ +if (process.env["INPUT_FAIL"] === "true") { + process.exit(1); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/push.yml new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/push.yml --- old/act-0.2.29/pkg/runner/testdata/ensure-post-steps/push.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/act-0.2.30/pkg/runner/testdata/ensure-post-steps/push.yml 2022-07-29 21:43:24.000000000 +0200 @@ -0,0 +1,8 @@ +name: test +on: push +jobs: + second-post-step-should-fail: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./ensure-post-steps/action-composite/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/evalenv/push.yml new/act-0.2.30/pkg/runner/testdata/evalenv/push.yml --- old/act-0.2.29/pkg/runner/testdata/evalenv/push.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/act-0.2.30/pkg/runner/testdata/evalenv/push.yml 2022-07-29 21:43:24.000000000 +0200 @@ -0,0 +1,21 @@ +name: CI + +on: push +jobs: + test: + runs-on: ubuntu-latest + env: + BUILD_DIR: ${{ github.workspace }}/build + steps: + - name: Dump + run: | + echo "$BUILD_DIR" + echo "$EXPECTED_BUILD_DIR" + echo "$GITHUB_WORKSPACE/build" + env: + EXPECTED_BUILD_DIR: ${{ github.workspace }}/build + - name: Test + run: | + [ "$BUILD_DIR" = "$EXPECTED_BUILD_DIR" ] && [ "$BUILD_DIR" = "$GITHUB_WORKSPACE/build" ] + env: + EXPECTED_BUILD_DIR: ${{ github.workspace }}/build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/job-container-non-root/push.yml new/act-0.2.30/pkg/runner/testdata/job-container-non-root/push.yml --- old/act-0.2.29/pkg/runner/testdata/job-container-non-root/push.yml 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/testdata/job-container-non-root/push.yml 2022-07-29 21:43:24.000000000 +0200 @@ -5,6 +5,6 @@ test: runs-on: ubuntu-latest container: - image: ghcr.io/catthehacker/ubuntu:runner-latest # image with user 'runner:runner' built on tag 'act-latest' + image: catthehacker/ubuntu:runner-latest # image with user 'runner:runner' built on tag 'act-latest' steps: - run: echo PASS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/shells/custom/push.yml new/act-0.2.30/pkg/runner/testdata/shells/custom/push.yml --- old/act-0.2.29/pkg/runner/testdata/shells/custom/push.yml 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/testdata/shells/custom/push.yml 2022-07-29 21:43:24.000000000 +0200 @@ -8,7 +8,7 @@ run: '' check-container: runs-on: ubuntu-latest - container: ghcr.io/justingrote/act-pwsh:latest + container: catthehacker/ubuntu:pwsh-latest steps: - shell: pwsh -v '. {0}' run: '' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/act-0.2.29/pkg/runner/testdata/shells/pwsh/push.yml new/act-0.2.30/pkg/runner/testdata/shells/pwsh/push.yml --- old/act-0.2.29/pkg/runner/testdata/shells/pwsh/push.yml 2022-06-30 04:19:35.000000000 +0200 +++ new/act-0.2.30/pkg/runner/testdata/shells/pwsh/push.yml 2022-07-29 21:43:24.000000000 +0200 @@ -10,7 +10,7 @@ $PSVersionTable check-container: runs-on: ubuntu-latest - container: ghcr.io/justingrote/act-pwsh:latest + container: catthehacker/ubuntu:pwsh-latest steps: - shell: ${{ env.MY_SHELL }} run: | ++++++ vendor.tar.gz ++++++ ++++ 13584 lines of diff (skipped)