This commit is contained in:
parent
991b99f5a5
commit
1c1bd57c92
@ -27,6 +27,18 @@ jobs:
|
|||||||
- name: install podman
|
- name: install podman
|
||||||
run: apt update && apt install podman -y
|
run: apt update && apt install podman -y
|
||||||
|
|
||||||
|
- name: 创建非特权用户
|
||||||
|
run: |
|
||||||
|
# 2. 创建用户 (如果需要)
|
||||||
|
adduser podmanuser
|
||||||
|
|
||||||
|
# 3. 配置 subuid/subgid
|
||||||
|
echo "podmanuser:100000:65536" >> /etc/subuid
|
||||||
|
echo "podmanuser:100000:65536" >> /etc/subgid
|
||||||
|
|
||||||
|
# 4. 切换到非 root 用户
|
||||||
|
su - podmanuser
|
||||||
|
|
||||||
- uses: redhat-actions/buildah-build@v2
|
- uses: redhat-actions/buildah-build@v2
|
||||||
with:
|
with:
|
||||||
image: my-new-image
|
image: my-new-image
|
||||||
@ -34,6 +46,9 @@ jobs:
|
|||||||
dockerfiles: |
|
dockerfiles: |
|
||||||
./Dockerfile
|
./Dockerfile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# - name: Print to Log
|
# - name: Print to Log
|
||||||
# id: print-to-log
|
# id: print-to-log
|
||||||
# uses: ./
|
# uses: ./
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user