Skip to content

Commit ef21f17

Browse files
authored
fix: update devcontainer template structure (#1132)
* fix: update devcontainer template structure * chore: fix linter findings * chore: correct hadolint execlude regex * chore: fix line endings
1 parent c0081cf commit ef21f17

File tree

11 files changed

+44
-40
lines changed

11 files changed

+44
-40
lines changed

.github/workflows/release-build.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -138,27 +138,9 @@ jobs:
138138

139139
publish-devcontainer-templates:
140140
name: 📝 Publish templates
141-
runs-on: ubuntu-latest
141+
uses: ./.github/workflows/wc-publish-templates.yml
142142
permissions:
143143
packages: write # is needed by devcontainers/action to write templates as OCI artifacts
144-
steps:
145-
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
146-
with:
147-
disable-sudo: true
148-
egress-policy: audit
149-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
150-
with:
151-
persist-credentials: false
152-
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
153-
with:
154-
registry: ghcr.io
155-
username: ${{ github.actor }}
156-
password: ${{ github.token }}
157-
- uses: devcontainers/action@1082abd5d2bf3a11abccba70eef98df068277772 # v1.4.3
158-
with:
159-
disable-repo-tagging: true
160-
publish-templates: true
161-
base-path-to-templates: .devcontainer
162144

163145
generate-documents:
164146
name: 📄 Documentation
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Publish Templates
3+
4+
on:
5+
workflow_call:
6+
7+
permissions: {}
8+
9+
jobs:
10+
publish-devcontainer-templates:
11+
name: 📝 Publish templates
12+
runs-on: ubuntu-latest
13+
permissions:
14+
packages: write # is needed by devcontainers/action to write templates as OCI artifacts
15+
steps:
16+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
17+
with:
18+
disable-sudo: true
19+
egress-policy: audit
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
persist-credentials: false
23+
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ github.token }}
28+
- uses: devcontainers/action@1082abd5d2bf3a11abccba70eef98df068277772 # v1.4.3
29+
with:
30+
disable-repo-tagging: true
31+
publish-templates: true
32+
base-path-to-templates: templates

.mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PRINT_ALPACA: false
2121
SHOW_SKIPPED_LINTERS: false
2222
SPELL_LYCHEE_FILE_EXTENSIONS:
2323
[".feature", ".json", ".md", ".md.j2", ".txt", ".yaml", ".yml"]
24-
DOCKERFILE_HADOLINT_FILTER_REGEX_EXCLUDE: (\.devcontainer/.*-template/.*$)
24+
DOCKERFILE_HADOLINT_FILTER_REGEX_EXCLUDE: (templates)
2525
FILTER_REGEX_EXCLUDE: (CHANGELOG.md|package-lock.json)
2626
# tasks.json is wrongfully matched against another schema,
2727
# and schemas for .vscode/[tasks.json|launch.json] are built
File renamed without changes.
File renamed without changes.

.devcontainer/cpp-template/.github/dependabot.yml renamed to templates/cpp/.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ updates:
77
schedule:
88
interval: weekly
99
cooldown:
10-
default-days: 5
10+
default-days: 7
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
{
2-
"id": "cpp-template",
2+
"id": "cpp",
33
"version": "6.7.1",
4-
"name": "amp-devcontainer-cpp",
4+
"name": "C++",
55
"description": "A modern, batteries-included software development environment for C++",
66
"documentationURL": "https://github.com/philips-software/amp-devcontainer/blob/main/README.md",
77
"licenseURL": "https://github.com/philips-software/amp-devcontainer/blob/main/LICENSE",
8-
"publisher": "philips-software",
98
"options": {
109
"imageVersion": {
1110
"type": "string",
1211
"description": "amp-devcontainer version",
1312
"default": "6.7.1"
1413
}
1514
},
16-
"optionalPaths": [
17-
".github/dependabot.yml"
18-
],
19-
"platforms": [
20-
"Any"
21-
]
15+
"optionalPaths": [".github/dependabot.yml"],
16+
"platforms": ["Any"]
2217
}
File renamed without changes.
File renamed without changes.

.devcontainer/rust-template/.github/dependabot.yml renamed to templates/rust/.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ updates:
77
schedule:
88
interval: weekly
99
cooldown:
10-
default-days: 5
10+
default-days: 7

0 commit comments

Comments
 (0)