File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,15 +36,10 @@ jobs:
3636 with :
3737 nix_path : nixpkgs=channel:nixos-unstable
3838
39- - name : Install Nix dependencies
40- run : |
41- nix-env -iA nixpkgs.dockerTools
42- nix-env -iA nixpkgs.gnutar
43- nix-env -iA nixpkgs.gzip
44-
4539 - name : Build Docker image with Nix
4640 run : |
47- nix-build docker.nix --option sandbox false
41+ # 使用 nix-shell 提供所需的环境,避免全局安装
42+ nix-shell -p dockerTools gnutar gzip --run "nix-build docker.nix --option sandbox false"
4843
4944 - name : Set up Docker Buildx
5045 uses : docker/setup-buildx-action@v3
@@ -106,7 +101,7 @@ jobs:
106101 sarif_file : ' trivy-results.sarif'
107102
108103 test :
109- runs-on : fedora -latest
104+ runs-on : ubuntu -latest
110105 needs : build
111106 if : github.event.inputs.push_images != 'false'
112107
@@ -159,7 +154,7 @@ jobs:
159154 "
160155
161156 cleanup :
162- runs-on : fedora -latest
157+ runs-on : ubuntu -latest
163158 needs : [build, test]
164159 if : always() && github.event.inputs.push_images != 'false'
165160
@@ -175,7 +170,7 @@ jobs:
175170 keep-versions : 10
176171
177172 generate-summary :
178- runs-on : fedora -latest
173+ runs-on : ubuntu -latest
179174 needs : [build, test]
180175 if : always()
181176
You can’t perform that action at this time.
0 commit comments