Skip to content

Commit 213e5f7

Browse files
authored
Display all crawled dev container features (#27)
* Create jekyll-gh-pages.yml * fetch dynamically * expose staticly too * add static dir * front end * trigger deployment * fix href * strip all HTML and append f.majorVersion to feature reference * add ref=nofollow to external refs
1 parent deef558 commit 213e5f7

File tree

6 files changed

+103
-4
lines changed

6 files changed

+103
-4
lines changed

.github/workflows/publish.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Publish to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["gh-pages"]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow one concurrent deployment
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
# Build job
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Install Oras
28+
run: |
29+
curl -LO https://github.com/oras-project/oras/releases/download/v0.13.0/oras_0.13.0_linux_amd64.tar.gz
30+
mkdir -p oras-install/
31+
tar -zxf oras_0.13.0_*.tar.gz -C oras-install/
32+
mv oras-install/oras /usr/local/bin/
33+
rm -rf oras_0.13.0_*.tar.gz oras-install/
34+
35+
- name: Fetch devcontainer-index.json
36+
run: |
37+
cd _data
38+
oras pull ghcr.io/devcontainers/index:latest
39+
cp devcontainer-index.json ../static/
40+
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v1
43+
44+
- name: Build with Jekyll
45+
uses: actions/jekyll-build-pages@v1
46+
with:
47+
source: ./
48+
destination: ./_site
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v1
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v1

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
npm-debug.log
22
_site
33
spec-generator/node_modules
4-
spec-generator/out
4+
spec-generator/out
5+
devcontainer-index.json

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,4 @@ RUBY VERSION
228228
ruby 2.7.6p219
229229

230230
BUNDLED WITH
231-
2.3.11
231+
2.3.20

collections.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1 style="margin-left: auto;margin-right: auto;">Collections</h1>
2323
{% for c in site.data.collection-index %}
2424
<tr>
2525
<td class="tg-0lax">{{ c.name }}</td>
26-
<td class="tg-0lax"><a href="{{ c.contact }}">{{ c.maintainer }}</a></td>
27-
<td class="tg-0lax"><a href="{{ c.repository }}">{{ c.repository }}</a></td>
26+
<td class="tg-0lax"><a rel="nofollow" href="{{ c.contact | strip_html }}">{{ c.maintainer | strip_html }}</a></td>
27+
<td class="tg-0lax"><a rel="nofollow" href="{{ c.repository | strip_html }}">{{ c.repository | strip_html }}</a></td>
2828
</tr>
2929
{% endfor %}

features.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Features
3+
layout: table
4+
sectionid: collection-index-features
5+
---
6+
7+
<h1 style="margin-left: auto;margin-right: auto;">Available Features</h1>
8+
<p style="margin-left: auto;margin-right: auto;">
9+
This table contains all official and community-supported <a href="implementors/features/">dev container features</a>
10+
known at the time of crawling <a href="collections">each registered collection</a>. This list is continuously
11+
updated with the latest available feature information.
12+
<br><br>
13+
<a href="implementors/features#referencing-a-feature">Referencing a feature</a> below can be done in the 'features' section of a devcontainer.json.
14+
</p>
15+
16+
<p>
17+
</p>
18+
<tr>
19+
<td class="tg-0lax"><b>Feature Name</b></b></td>
20+
<td class="tg-0lax"><b>Maintainer</b></td>
21+
<td class="tg-0lax"><b>Reference</b></td>
22+
<td class="tg-0lax"><b>Latest Version</b></td>
23+
</tr>
24+
25+
{% for c in site.data.devcontainer-index.collections %}
26+
{% for f in c.features %}
27+
<tr>
28+
<td class="tg-0lax"><a rel="nofollow" href="{{ f.documentationURL | strip_html }}">{{ f.name | strip_html }}</a></td>
29+
<td class="tg-0lax">{{ c.sourceInformation.maintainer | strip_html }}</td>
30+
<td class="tg-0lax"><code>{{ f.id | strip_html }}:{{ f.majorVersion | strip_html }}</code></td>
31+
<td class="tg-0lax"><code>{{ f.version | strip_html }}</code></td>
32+
</tr>
33+
{% endfor %}
34+
35+
{% endfor %}

static/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)