Skip to content

Commit

Permalink
ci: always update the package db before installing packages
Browse files Browse the repository at this point in the history
This should fix installing packages on build-extra.yml.

Note that this is already done on build.yml and on gitlab-ci.yml.

From the GitHub Actions documentation[1] [2]:

> 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.

[1] https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners
[2] actions/runner-images#2924
  • Loading branch information
kmk3 committed Mar 21, 2023
1 parent 8cf0d94 commit ff42f72
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
azure.archive.ubuntu.com:80
github.com:443
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: update package information
run: sudo apt-get update
- name: install dependencies
run: sudo apt-get install libapparmor-dev libselinux1-dev
- name: configure
Expand All @@ -82,6 +84,8 @@ jobs:
azure.archive.ubuntu.com:80
github.com:443
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: update package information
run: sudo apt-get update
- name: install clang-tools-14 and dependencies
run: sudo apt-get install clang-tools-14 libapparmor-dev libselinux1-dev
- name: configure
Expand All @@ -99,6 +103,8 @@ jobs:
azure.archive.ubuntu.com:80
github.com:443
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: update package information
run: sudo apt-get update
- name: install cppcheck
run: sudo apt-get install cppcheck
- name: cppcheck
Expand All @@ -116,6 +122,8 @@ jobs:
azure.archive.ubuntu.com:80
github.com:443
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: update package information
run: sudo apt-get update
- name: install cppcheck
run: sudo apt-get install cppcheck
- name: cppcheck
Expand All @@ -131,6 +139,8 @@ jobs:
azure.archive.ubuntu.com:80
github.com:443
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: update package information
run: sudo apt-get update
- name: install dependencies
run: sudo apt-get install codespell
- name: codespell
Expand Down

0 comments on commit ff42f72

Please sign in to comment.