Skip to content

Commit 8555bad

Browse files
committed
Update build-dev-container.yaml workflow
1 parent dfe0b2b commit 8555bad

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

.github/workflows/build-dev-container.yaml

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,37 @@ jobs:
1212
outputs:
1313
dir: ${{ steps.list-dir.outputs.dir }}
1414
steps:
15-
- id: "list-dir"
16-
shell: python
17-
run: |
18-
import os
19-
import json
20-
21-
dir = "templates"
22-
dirs = [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]
23-
print(f"::set-output name=dir::{json.dumps(dirs)}")
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: List Dir
19+
id: list-dir
20+
uses: pnstack/actions/list-dir@main
21+
with:
22+
dir: templates
2423
- name: log
2524
run: echo ${{ steps.list-dir.outputs.dir }}
2625

27-
# build:
28-
# runs-on: ubuntu-latest
29-
# needs: [list-dir]
30-
# strategy:
31-
# matrix:
32-
# dir: ${{fromJson(needs.list-dir.outputs.dir)}}
33-
# steps:
34-
# - name: Checkout
35-
# uses: actions/checkout@v4
26+
build:
27+
runs-on: ubuntu-latest
28+
needs: [list-dir]
29+
strategy:
30+
matrix:
31+
dir: ${{fromJson(needs.list-dir.outputs.dir)}}
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
3635

37-
# - name: Login to GitHub Container Registry
38-
# uses: docker/login-action@v2
39-
# with:
40-
# registry: ghcr.io
41-
# username: ${{ github.repository_owner }}
42-
# password: ${{ secrets.GITHUB_TOKEN }}
36+
- name: Login to GitHub Container Registry
37+
uses: docker/login-action@v2
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.repository_owner }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
4342

44-
# - name: Build and run Dev Container task
45-
# uses: devcontainers/[email protected]
46-
# with:
47-
# subFolder: ./templates/${{ matrix.dir }}
48-
# imageName: ghcr.io/pnstack/codespace/${{ matrix.dir }}
49-
# push: always
43+
- name: Build and run Dev Container task
44+
uses: devcontainers/[email protected]
45+
with:
46+
subFolder: ./templates/${{ matrix.dir }}
47+
imageName: ghcr.io/pnstack/codespace/${{ matrix.dir }}
48+
push: always

0 commit comments

Comments
 (0)