Skip to content

Commit d558309

Browse files
authored
fix: Handle containerception (#4)
This repo uses a devcontainer to build and test another devcontainer. The devcontainer/ci action was not really designed with this use case in mind. Maybe it works by splitting it into multiple steps.
1 parent 13a103b commit d558309

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,10 @@ jobs:
3030
username: ${{ github.actor }}
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

33-
- name: Check, Build, Test, Publish
33+
# Use .devcontainer from THIS repo for building and testing
34+
- name: Check, Build, Test
3435
uses: devcontainers/ci@v0.3
3536
with:
36-
cacheFrom: ghcr.io/eclipse-score/devcontainer
37-
imageName: ghcr.io/eclipse-score/devcontainer
38-
# publish latest from main branch; tags are handled in release workflow
39-
imageTag: latest
40-
refFilterForPush: 'refs/heads/main'
41-
subFolder: src/s-core-devcontainer
4237
runCmd: |
4338
# Check
4439
pre-commit run --show-diff-on-failure --color=always --all-files || exit -1
@@ -48,3 +43,14 @@ jobs:
4843
4944
# Test
5045
./scripts/test.sh
46+
47+
# Upload devcontainer from src/s-core-devcontainer
48+
- name: Publish
49+
uses: devcontainers/ci@v0.3
50+
with:
51+
cacheFrom: ghcr.io/eclipse-score/devcontainer
52+
imageName: ghcr.io/eclipse-score/devcontainer
53+
# publish latest from main branch; tags are handled in release workflow
54+
imageTag: latest
55+
refFilterForPush: 'refs/heads/main'
56+
subFolder: src/s-core-devcontainer

.github/workflows/release.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ jobs:
2525
username: ${{ github.actor }}
2626
password: ${{ secrets.GITHUB_TOKEN }}
2727

28-
- name: Check, Build, Test, Publish
28+
# Use .devcontainer from THIS repo for building and testing
29+
- name: Check, Build, Test
2930
uses: devcontainers/ci@v0.3
3031
with:
31-
imageName: ghcr.io/eclipse-score/devcontainer
32-
cacheFrom: ghcr.io/eclipse-score/devcontainer
33-
imageTag: ${{ github.ref_name }}
34-
subFolder: src/s-core-devcontainer
3532
runCmd: |
3633
# Check
3734
pre-commit run --show-diff-on-failure --color=always --all-files || exit -1
@@ -41,3 +38,12 @@ jobs:
4138
4239
# Test
4340
./scripts/test.sh
41+
42+
# Upload devcontainer from src/s-core-devcontainer
43+
- name: Publish
44+
uses: devcontainers/ci@v0.3
45+
with:
46+
imageName: ghcr.io/eclipse-score/devcontainer
47+
cacheFrom: ghcr.io/eclipse-score/devcontainer
48+
imageTag: ${{ github.ref_name }}
49+
subFolder: src/s-core-devcontainer

0 commit comments

Comments
 (0)