Commit 914a826
committed
RHOAIENG-21668: chore(gha): mount Red Hat subscription in GitHub Actions
Here's how this is supposed to work.
On a subscribed machine, podman mounts the secrets directory into the container as a volume.
```
$ cat /usr/share/containers/mounts.conf
/usr/share/rhel/secrets:/run/secrets
```
Furthermore, there may be ``/run/secrets/etc-pki-entitlement` and ``/run/secrets/rhsm`.
The approach that actually worked for me is https://access.redhat.com/solutions/5558771
First, `subscription-manager` detects a container and behaves differently there.
So, run `subscription-manager` with `SMDEV_CONTAINER_OFF=1` to subscribe container as if it was a physical machine.
Then, look into `/etc/pki/entitlement` for certificates as suggested in https://grep.be/blog//en/work/The_future_of_the_eID_on_RHEL/
Finally, copy out and store the certificates as CI secrets for reuse in jobs.1 parent 6df0b41 commit 914a826
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments