[GH-ISSUE #2462] Ubuntu and package installation #1135

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

Originally created by @wawrzek on GitHub (Sep 16, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2462

Details

In the act workflows installing Ubuntu packages with apt, the list of sources has to be refreshed first with apt update. The same is not required in GHA. I can run apt install -y $PACKAGE straight away.
AFAIK that's the 'feature' of docker image, nothing particular to act. I suggest adding one-liner to documentation, something like:
"Ubuntu docker image requires a source list refresh before running apt install. Therefore, any workflow with the deb package installation action requires the apt update to be run first."

Originally created by @wawrzek on GitHub (Sep 16, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2462 ### Details In the act workflows installing Ubuntu packages with apt, the list of sources has to be refreshed first with `apt update`. The same is not required in GHA. I can run `apt install -y $PACKAGE` straight away. AFAIK that's the 'feature' of docker image, nothing particular to act. I suggest adding one-liner to documentation, something like: "Ubuntu docker image requires a source list refresh before running `apt install`. Therefore, any workflow with the deb package installation action requires the `apt update` to be run first."
Author
Owner

@github-actions[bot] commented on GitHub (Mar 16, 2025):

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

<!-- gh-comment-id:2727078365 --> @github-actions[bot] commented on GitHub (Mar 16, 2025): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@panekj commented on GitHub (Mar 16, 2025):

The same is not required in GHA.

Note

Always run sudo apt-get update before installing a package. In case the apt index is stale, this command fetches and re-indexes any available packages, which helps prevent package installation failures.

https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners


Indexes in docker images are removed specifically so people have to add the apt update step

<!-- gh-comment-id:2727359784 --> @panekj commented on GitHub (Mar 16, 2025): > The same is not required in GHA. > [!NOTE] > Always run `sudo apt-get update` before installing a package. In case the apt index is stale, this command fetches and re-indexes any available packages, which helps prevent package installation failures. https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners --- Indexes in docker images are removed specifically so people have to add the `apt update` step
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#1135
No description provided.