├── .github
└── workflows
│ └── site.yml
├── _config.yml
├── assets
└── css
│ └── style.scss
├── build-site-data.sh
└── index.md
/.github/workflows/site.yml:
--------------------------------------------------------------------------------
1 | name: Build and Deploy Site
2 | on:
3 | push:
4 | branches: master
5 | schedule:
6 | - cron: 0 0 * * *
7 | jobs:
8 | build-and-deploy:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Checkout
12 | uses: actions/checkout@v2
13 | with:
14 | persist-credentials: false
15 |
16 | - name: Install jq
17 | uses: dcarbone/install-jq-action@v1.0.1
18 |
19 | - name: Build Site Data
20 | env:
21 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 | run: |
23 | mkdir _data
24 | ./build-site-data.sh _data/apps.yml
25 |
26 | - name: Deploy
27 | uses: JamesIves/github-pages-deploy-action@3.7.1
28 | with:
29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 | BRANCH: gh-pages # The branch the action should deploy to.
31 | FOLDER: . # The folder the action should deploy.
32 | CLEAN: true # Automatically remove deleted files from the deploy branch.
33 | SINGLE_COMMIT: true
34 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
2 | title: Docker Container Applications
3 | description: Portal for my Docker container applications
4 | github:
5 | is_project_page: false
6 |
--------------------------------------------------------------------------------
/assets/css/style.scss:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | @import "{{ site.theme }}";
5 |
6 |
7 | .main-content {
8 | table {
9 | display: table;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/build-site-data.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e # Exit immediately if a command exits with a non-zero status.
4 | set -u # Treat unset variables as an error.
5 |
6 | DATA_FILE="${1:-}"
7 | TMPDIR="$(mktemp -d)"
8 |
9 | clean_exit() {
10 | rm -rf "$TMPDIR"
11 | }
12 | trap "clean_exit" EXIT
13 |
14 | if [ -z "$DATA_FILE" ]; then
15 | echo "ERROR: Data file not set."
16 | exit 1
17 | fi
18 |
19 | echo "Fetching repositories..."
20 | if [ "${GITHUB_TOKEN:-UNSET}" = "UNSET" ]; then
21 | REPOS=$(curl -s -f https://api.github.com/users/jlesage/repos?per_page=1000 | jq -r '.[] | select(.name|startswith("docker-")) | select(.archived == false and .fork == false).name')
22 | else
23 | REPOS=$(curl -H "Authorization: token $GITHUB_TOKEN" -s -f https://api.github.com/users/jlesage/repos?per_page=1000 | jq -r '.[] | select(.name|startswith("docker-")) | select(.archived == false and .fork == false).name')
24 | fi
25 | if [ "${REPOS:-UNSET}" = "UNSET" ]; then
26 | echo "ERROR: No repository found."
27 | echo "--------------------------------------"
28 | curl https://api.github.com/users/jlesage/repos
29 | echo "--------------------------------------"
30 | exit 1
31 | fi
32 |
33 | echo > "$DATA_FILE"
34 |
35 | for REPO in $REPOS; do
36 | echo "Fetching appdefs from jlesage/$REPO..."
37 |
38 | FRIENDLY_NAME=
39 |
40 | if [ -z "$FRIENDLY_NAME" ]; then
41 | set +e
42 | curl -f -s -o "$TMPDIR"/$REPO.appdefs.yml https://raw.githubusercontent.com/jlesage/$REPO/master/appdefs.yml
43 | RC=$?
44 | set -e
45 | if [ $RC -eq 0 ]; then
46 | FRIENDLY_NAME="$(cat "$TMPDIR"/$REPO.appdefs.yml | sed -n 's|.*friendly_name: \(.*\)|\1|p')"
47 | fi
48 | fi
49 |
50 | if [ -z "$FRIENDLY_NAME" ]; then
51 | set +e
52 | curl -f -s -o "$TMPDIR"/$REPO.appdefs.xml https://raw.githubusercontent.com/jlesage/$REPO/master/appdefs.xml
53 | RC=$?
54 | set -e
55 | if [ $RC -eq 0 ]; then
56 | FRIENDLY_NAME="$(cat "$TMPDIR"/$REPO.appdefs.xml | sed -n 's|.*
24 | ![]() |