[GH-ISSUE #2270] can't change default image on Ubuntu Start image=node:16-buster-slim #1060

Closed
opened 2026-03-01 21:48:36 +03:00 by kerem · 2 comments
Owner

Originally created by @yucelz on GitHub (Apr 2, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2270

Bug report info

act --bug-report
act version:            0.2.60
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:           
        /home/{user_name}/.config/act/actrc:
                -P ubuntu-latest=node:16-buster-slim
                -P ubuntu-22.04=node:16-bullseye-slim
                -P ubuntu-20.04=node:16-buster-slim
                -P ubuntu-18.04=node:16-buster-slim
Build info:
        Go version:            go1.20.14
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.60 -X main.commit=d3c8664d3d6acb855ae5418f6d02930c98bf877e -X main.date=2024-03-01T02:13:23Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         d3c8664d3d6acb855ae5418f6d02930c98bf877e
                vcs.time:             2024-03-01T02:12:58Z
                vcs.modified:         false
Docker Engine:
        Engine version:        24.0.5
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Ubuntu Core 22
        OS type:               linux
        OS version:            22
        OS arch:               x86_64
        OS kernel:             5.15.0-101-generic
        OS CPU:                12
        OS memory:             15818 MB
        Security options:
                name=apparmor
                name=seccomp,profile=builtin

Command used with act

act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04

Describe issue

I was trying to change the default image set based on my first workflow attempt but couldn't do it. as a quick solution, I deleted everything under /home/{user_name}/.config/act/actrc

No response

Workflow content

name: Pre-commit

on:
  pull_request:
  push:
    branches: [main]

jobs:
  pre-commit:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.11'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pre-commit
    - name: Run pre-commit
      run: python src/test.py

Relevant log output

-

Additional information

No response

Originally created by @yucelz on GitHub (Apr 2, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2270 ### Bug report info ```plain text act --bug-report act version: 0.2.60 GOOS: linux GOARCH: amd64 NumCPU: 12 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/{user_name}/.config/act/actrc: -P ubuntu-latest=node:16-buster-slim -P ubuntu-22.04=node:16-bullseye-slim -P ubuntu-20.04=node:16-buster-slim -P ubuntu-18.04=node:16-buster-slim Build info: Go version: go1.20.14 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.60 -X main.commit=d3c8664d3d6acb855ae5418f6d02930c98bf877e -X main.date=2024-03-01T02:13:23Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: d3c8664d3d6acb855ae5418f6d02930c98bf877e vcs.time: 2024-03-01T02:12:58Z vcs.modified: false Docker Engine: Engine version: 24.0.5 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Ubuntu Core 22 OS type: linux OS version: 22 OS arch: x86_64 OS kernel: 5.15.0-101-generic OS CPU: 12 OS memory: 15818 MB Security options: name=apparmor name=seccomp,profile=builtin ``` ### Command used with act ```sh act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 ``` ### Describe issue I was trying to change the default image set based on my first workflow attempt but couldn't do it. as a quick solution, I deleted everything under /home/{user_name}/.config/act/actrc ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Pre-commit on: pull_request: push: branches: [main] jobs: pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip pip install pre-commit - name: Run pre-commit run: python src/test.py ``` ### Relevant log output ```sh - ``` ### Additional information _No response_
kerem 2026-03-01 21:48:36 +03:00
Author
Owner

@ChristopherHX commented on GitHub (Apr 2, 2024):

Yes you can't change runs-on: ubuntu-latest with a -P ubuntu-18.04=... cli argument. This will only change the image for runs-on: ubuntu-18.04.

I don't think it is a bug to demand you to type -P ubuntu-latest=... in your example

<!-- gh-comment-id:2032032805 --> @ChristopherHX commented on GitHub (Apr 2, 2024): Yes you can't change `runs-on: ubuntu-latest` with a `-P ubuntu-18.04=...` cli argument. This will only change the image for `runs-on: ubuntu-18.04`. I don't think it is a bug to demand you to type `-P ubuntu-latest=...` in your example
Author
Owner

@github-actions[bot] commented on GitHub (Sep 30, 2024):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2381675919 --> @github-actions[bot] commented on GitHub (Sep 30, 2024): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1060
No description provided.