From 34dc2dc15c2faa6c1d81f2deb7aa8be712a779d7 Mon Sep 17 00:00:00 2001 From: hackercat Date: Tue, 23 Feb 2021 18:49:24 +0100 Subject: [PATCH] Update Docker images (#524) --- README.md | 14 +++++++------- cmd/platforms.go | 8 ++++---- cmd/root.go | 2 +- pkg/runner/runner_test.go | 6 +++--- pkg/runner/step_context_test.go | 2 +- .../testdata/actions/docker-local/Dockerfile | 2 +- pkg/runner/testdata/actions/docker-url/action.yml | 2 +- pkg/runner/testdata/basic/push.yml | 2 +- pkg/runner/testdata/fail/push.yml | 2 +- pkg/runner/testdata/job-container/push.yml | 4 ++-- pkg/runner/testdata/uses-docker-url/push.yml | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 12ad02e..2748632 100644 --- a/README.md +++ b/README.md @@ -127,12 +127,12 @@ steps: GitHub Actions offers managed [virtual environments](https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners) for running workflows. In order for `act` to run your workflows locally, it must run a container for the runner defined in your workflow file. Here are the images that `act` uses for each runner type and size: -| GitHub Runner | Micro Docker Image | Medium Docker Image | Large Docker Image | -| -------------- | ------------------------------- | ---------------------------------------- | --------------------------------------------- | -| ubuntu-latest | [node:12.6-buster-slim][micro] | [catthehacker/ubuntu:act-latest][medium] | [nektos/act-environments-ubuntu:18.04][large] | -| ubuntu-20.04 | [node:12.6-buster-slim][micro] | [catthehacker/ubuntu:act-20.04][medium] | `unavailable` | -| ubuntu-18.04 | [node:12.6-buster-slim][micro] | [catthehacker/ubuntu:act-18.04][medium] | [nektos/act-environments-ubuntu:18.04][large] | -| ubuntu-16.04 | [node:12.6-stretch-slim][micro] | [catthehacker/ubuntu:act-16.04][medium] | `unavailable` | +| GitHub Runner | Micro Docker Image | Medium Docker Image | Large Docker Image | +| -------------- | ---------------------------------- | ---------------------------------------- | --------------------------------------------- | +| ubuntu-latest | [node:12.20.1-buster-slim][micro] | [catthehacker/ubuntu:act-latest][medium] | [nektos/act-environments-ubuntu:18.04][large] | +| ubuntu-20.04 | [node:12.20.1-buster-slim][micro] | [catthehacker/ubuntu:act-20.04][medium] | `unavailable` | +| ubuntu-18.04 | [node:12.20.1-buster-slim][micro] | [catthehacker/ubuntu:act-18.04][medium] | [nektos/act-environments-ubuntu:18.04][large] | +| ubuntu-16.04 | [node:12.20.1-stretch-slim][micro] | [catthehacker/ubuntu:act-16.04][medium] | `unavailable` | Below platforms are currently **unsupported and won't work** (see issue [#97]) @@ -177,7 +177,7 @@ If you use multiple platforms in your workflow, you have to specify them to chan For example, if your workflow uses `ubuntu-18.04`, `ubuntu-16.04` and `ubuntu-latest`, specify all platforms like below ```sh -act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -P ubuntu-latest=ubuntu:latest -P ubuntu-16.04=node:12.6-buster-slim +act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -P ubuntu-latest=ubuntu:latest -P ubuntu-16.04=node:12.20.1-buster-slim ``` # Secrets diff --git a/cmd/platforms.go b/cmd/platforms.go index 4be7896..a6a2359 100644 --- a/cmd/platforms.go +++ b/cmd/platforms.go @@ -6,10 +6,10 @@ import ( func (i *Input) newPlatforms() map[string]string { platforms := map[string]string{ - "ubuntu-latest": "node:12.6-buster-slim", - "ubuntu-20.04": "node:12.6-buster-slim", - "ubuntu-18.04": "node:12.6-buster-slim", - "ubuntu-16.04": "node:12.6-stretch-slim", + "ubuntu-latest": "node:12.20.1-buster-slim", + "ubuntu-20.04": "node:12.20.1-buster-slim", + "ubuntu-18.04": "node:12.20.1-buster-slim", + "ubuntu-16.04": "node:12.20.1-stretch-slim", "windows-latest": "", "windows-2019": "", "macos-latest": "", diff --git a/cmd/root.go b/cmd/root.go index eb8174a..2a9a80c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -220,7 +220,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str case "Medium": option = "-P ubuntu-latest=catthehacker/ubuntu:act-latest\n-P ubuntu-20.04=catthehacker/ubuntu:act-20.04\n-P ubuntu-18.04=catthehacker/ubuntu:act-18.04\nubuntu-16.04=catthehacker/ubuntu:act-16.04" case "Micro": - option = "-P ubuntu-latest=node:12.6-buster-slim\n-P ubuntu-20.04=node:12.6-buster-slim\n-P ubuntu-18.04=node:12.6-buster-slim\n-P ubuntu-16.04=node:12.6-stretch-slim" + option = "-P ubuntu-latest=node:12.20.1-buster-slim\n-P ubuntu-20.04=node:12.20.1-buster-slim\n-P ubuntu-18.04=node:12.20.1-buster-slim\n-P ubuntu-16.04=node:12.20.1-stretch-slim" } f, err := os.Create(actrc[0]) diff --git a/pkg/runner/runner_test.go b/pkg/runner/runner_test.go index b87d71b..4199e19 100644 --- a/pkg/runner/runner_test.go +++ b/pkg/runner/runner_test.go @@ -74,7 +74,7 @@ func TestRunEvent(t *testing.T) { } platforms := map[string]string{ - "ubuntu-latest": "node:12.6-buster-slim", + "ubuntu-latest": "node:12.20.1-buster-slim", } tables := []TestJobFileInfo{ {"testdata", "basic", "push", "", platforms}, @@ -113,7 +113,7 @@ func TestRunEventSecrets(t *testing.T) { ctx := context.Background() platforms := map[string]string{ - "ubuntu-latest": "node:12.6-buster-slim", + "ubuntu-latest": "node:12.20.1-buster-slim", } workflowPath := "secrets" @@ -154,7 +154,7 @@ func TestRunEventPullRequest(t *testing.T) { ctx := context.Background() platforms := map[string]string{ - "ubuntu-latest": "node:12.6-buster-slim", + "ubuntu-latest": "node:12.20.1-buster-slim", } workflowPath := "pull-request" diff --git a/pkg/runner/step_context_test.go b/pkg/runner/step_context_test.go index fa5f722..527da67 100644 --- a/pkg/runner/step_context_test.go +++ b/pkg/runner/step_context_test.go @@ -9,7 +9,7 @@ import ( func TestStepContextExecutor(t *testing.T) { platforms := map[string]string{ - "ubuntu-latest": "node:12.6-buster-slim", + "ubuntu-latest": "node:12.20.1-buster-slim", } tables := []TestJobFileInfo{ {"testdata", "uses-github-empty", "push", "Expected format {org}/{repo}[/path]@ref", platforms}, diff --git a/pkg/runner/testdata/actions/docker-local/Dockerfile b/pkg/runner/testdata/actions/docker-local/Dockerfile index fa0188a..6205149 100644 --- a/pkg/runner/testdata/actions/docker-local/Dockerfile +++ b/pkg/runner/testdata/actions/docker-local/Dockerfile @@ -1,5 +1,5 @@ # Container image that runs your code -FROM alpine:3.10 +FROM alpine:3.13 # Copies your code file from your action repository to the filesystem path `/` of the container COPY entrypoint.sh /entrypoint.sh diff --git a/pkg/runner/testdata/actions/docker-url/action.yml b/pkg/runner/testdata/actions/docker-url/action.yml index d5e5e56..70434cb 100644 --- a/pkg/runner/testdata/actions/docker-url/action.yml +++ b/pkg/runner/testdata/actions/docker-url/action.yml @@ -8,7 +8,7 @@ inputs: default: World runs: using: docker - #image: docker://alpine:3.8 + #image: docker://alpine:3.13 image: docker://node:12-alpine env: TEST: enabled diff --git a/pkg/runner/testdata/basic/push.yml b/pkg/runner/testdata/basic/push.yml index 22d3076..898517f 100644 --- a/pkg/runner/testdata/basic/push.yml +++ b/pkg/runner/testdata/basic/push.yml @@ -10,7 +10,7 @@ jobs: steps: - run: echo ${{ env.TEST }} | grep value - run: env - - uses: docker://alpine:3.8 + - uses: docker://alpine:3.13 with: somekey: ${{ env.TEST }} args: echo ${INPUT_SOMEKEY} | grep somevalue diff --git a/pkg/runner/testdata/fail/push.yml b/pkg/runner/testdata/fail/push.yml index c33e27f..892df60 100644 --- a/pkg/runner/testdata/fail/push.yml +++ b/pkg/runner/testdata/fail/push.yml @@ -5,7 +5,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: node:10.16-jessie + image: node:12.20.1-buster env: TEST_ENV: test-value steps: diff --git a/pkg/runner/testdata/job-container/push.yml b/pkg/runner/testdata/job-container/push.yml index f4eab3d..1d25750 100644 --- a/pkg/runner/testdata/job-container/push.yml +++ b/pkg/runner/testdata/job-container/push.yml @@ -5,7 +5,7 @@ jobs: test: runs-on: ubuntu-latest container: - image: node:10.16-jessie + image: node:12.20.1-buster env: TEST_ENV: test-value steps: @@ -13,7 +13,7 @@ jobs: test2: runs-on: ubuntu-latest - container: node:10.16-jessie + container: node:12.20.1-buster steps: - run: echo ${TEST_ENV} | grep test-value env: diff --git a/pkg/runner/testdata/uses-docker-url/push.yml b/pkg/runner/testdata/uses-docker-url/push.yml index 204a0e0..e502096 100644 --- a/pkg/runner/testdata/uses-docker-url/push.yml +++ b/pkg/runner/testdata/uses-docker-url/push.yml @@ -5,7 +5,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: docker://alpine:3.8 + - uses: docker://alpine:3.13 with: somekey: somevalue args: echo ${INPUT_SOMEKEY} | grep somevalue