gh-36358: CI: Fix the multi-stage build in ci-linux.yml, fix conda/centos/archlinux system packages
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
Fixes breakage from #36338 seen in https://github.com/sagemath/sage/acti
ons/runs/6332061118/job/17206153694:
The 2nd stage (`...-with-targets`) does not find the container from the
1st stage (`...-with-targets-pre`) because they are keyed to the commit
sha. Fixed here by keying it to the sha before merging the CI fixes.
Also fixing the following failures:
- `conda-forge-minimal` (as seen in https://github.com/sagemath/sage/act
ions/runs/6207962004/job/16858998561); failed because the python3
depcheck packages were missing. Fixed now - check with `tox -e docker-
conda-forge-minimal -- config.status`
- `centos-stream-9-python3.9-minimal` (https://github.com/sagemath/sage/
actions/runs/6207962004/job/16858997494),
`almalinux-9-python3.11-minimal` (https://github.com/sagemath/sage/actio
ns/runs/6207962004/job/16858997663) and `-standard`; fixes #34786
- `archlinux-standard` - libgiac was missing in at least one run
Also adding a few more uses of GH Action output groups for convenience.
Tests running at https://github.com/mkoeppe/sage/actions/workflows/ci-
linux.yml
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
### :hourglass: Dependencies
<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
URL: https://github.com/sagemath/sage/pull/36358
Reported by: Matthias Köppe
Reviewer(s): Dima Pasechnik