Skip to content

Commit eebf9ad

Browse files
committed
missed import docs and return building packages
1 parent 0ff214c commit eebf9ad

File tree

3 files changed

+236
-0
lines changed

3 files changed

+236
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Docker
2+
3+
# This workflow uses actions that are not certified by GitHub.
4+
# They are provided by a third-party and are governed by
5+
# separate terms of service, privacy policy, and support
6+
# documentation.
7+
8+
on:
9+
schedule:
10+
- cron: '24 19 * * *'
11+
push:
12+
branches: [ "main" ]
13+
# Publish semver tags as releases.
14+
tags: [ 'v*.*.*' ]
15+
pull_request:
16+
branches: [ "main" ]
17+
18+
env:
19+
# Use docker.io for Docker Hub if empty
20+
REGISTRY: ghcr.io
21+
# github.repository as <account>/<repo>
22+
IMAGE_NAME: ${{ github.repository }}
23+
24+
25+
jobs:
26+
build:
27+
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
packages: write
32+
# This is used to complete the identity challenge
33+
# with sigstore/fulcio when running outside of PRs.
34+
id-token: write
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
# Install the cosign tool except on PR
41+
# https://github.com/sigstore/cosign-installer
42+
- name: Install cosign
43+
if: github.event_name != 'pull_request'
44+
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
45+
with:
46+
cosign-release: 'v2.2.4'
47+
48+
# Set up BuildKit Docker container builder to be able to build
49+
# multi-platform images and export cache
50+
# https://github.com/docker/setup-buildx-action
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
53+
54+
# Login against a Docker registry except on PR
55+
# https://github.com/docker/login-action
56+
- name: Log into registry ${{ env.REGISTRY }}
57+
if: github.event_name != 'pull_request'
58+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
59+
with:
60+
registry: ${{ env.REGISTRY }}
61+
username: ${{ github.actor }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
64+
# Extract metadata (tags, labels) for Docker
65+
# https://github.com/docker/metadata-action
66+
- name: Extract Docker metadata
67+
id: meta
68+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
69+
with:
70+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71+
72+
# Build and push Docker image with Buildx (don't push on PR)
73+
# https://github.com/docker/build-push-action
74+
- name: Build and push Docker image
75+
id: build-and-push
76+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
77+
with:
78+
context: .
79+
push: ${{ github.event_name != 'pull_request' }}
80+
tags: ${{ steps.meta.outputs.tags }}
81+
labels: ${{ steps.meta.outputs.labels }}
82+
cache-from: type=gha
83+
cache-to: type=gha,mode=max
84+
85+
# Sign the resulting Docker image digest except on PRs.
86+
# This will only write to the public Rekor transparency log when the Docker
87+
# repository is public to avoid leaking data. If you would like to publish
88+
# transparency data even for private images, pass --force to cosign below.
89+
# https://github.com/sigstore/cosign
90+
- name: Sign the published Docker image
91+
if: ${{ github.event_name != 'pull_request' }}
92+
env:
93+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
94+
TAGS: ${{ steps.meta.outputs.tags }}
95+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
96+
# This step uses the identity token to provision an ephemeral certificate
97+
# against the sigstore community Fulcio instance.
98+
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

.github/workflows/flatpak.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: flatpak-ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
tags: [ 'v*', '*.*.*' ]
8+
workflow_dispatch:
9+
inputs:
10+
publish_repo:
11+
description: 'Also publish an OSTree repo to gh-pages (may fail on large apps due to GitHub file size limits)'
12+
required: false
13+
default: 'false'
14+
15+
permissions:
16+
contents: write
17+
pages: write
18+
id-token: write
19+
20+
jobs:
21+
build:
22+
name: Build Flatpak
23+
runs-on: ubuntu-latest
24+
container:
25+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
26+
options: --privileged
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Build bundle with flatpak-builder
32+
id: build
33+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
34+
with:
35+
manifest-path: linux/io.github.gcclinux.EasyEdit.yml
36+
build-bundle: true
37+
bundle: EasyEdit.flatpak
38+
cache-key: flatpak-24.08
39+
40+
- name: Upload bundle artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: EasyEdit.flatpak
44+
path: EasyEdit.flatpak
45+
46+
- name: Validate AppStream (if present)
47+
run: |
48+
if command -v appstream-util >/dev/null 2>&1; then
49+
if ls build-dir/files/share/metainfo/*.xml 1> /dev/null 2>&1; then
50+
appstream-util validate-relax --nonet build-dir/files/share/metainfo/*.xml || true
51+
fi
52+
fi
53+
54+
publish-repo:
55+
name: Export and publish OSTree repo (gh-pages)
56+
needs: build
57+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish_repo == 'true'
58+
continue-on-error: true
59+
runs-on: ubuntu-latest
60+
container:
61+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
62+
options: --privileged
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v4
66+
67+
- name: Download bundle artifact
68+
uses: actions/download-artifact@v4
69+
with:
70+
name: EasyEdit.flatpak
71+
path: ./
72+
73+
- name: Create OSTree repo and import bundle
74+
run: |
75+
rm -rf repo
76+
mkdir -p repo
77+
ostree --repo=repo init --mode=archive-z2
78+
flatpak build-import-bundle --no-update-summary repo EasyEdit.flatpak
79+
flatpak build-update-repo --static-deltas=false repo
80+
81+
- name: Publish repo to gh-pages
82+
uses: peaceiris/actions-gh-pages@v3
83+
with:
84+
github_token: ${{ secrets.GITHUB_TOKEN }}
85+
publish_branch: gh-pages
86+
publish_dir: repo
87+
destination_dir: flatpak-repo
88+
keep_files: true
89+
90+
attach-release:
91+
name: Attach bundle to GitHub Release
92+
needs: build
93+
if: startsWith(github.ref, 'refs/tags/')
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Download bundle artifact
97+
uses: actions/download-artifact@v4
98+
with:
99+
name: EasyEdit.flatpak
100+
path: ./
101+
102+
- name: Upload release asset
103+
uses: softprops/action-gh-release@v2
104+
with:
105+
files: |
106+
EasyEdit.flatpak
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
110+
validate-flathub:
111+
name: Build Flathub-ready manifest (validation)
112+
runs-on: ubuntu-latest
113+
container:
114+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
115+
options: --privileged
116+
steps:
117+
- name: Checkout repository
118+
uses: actions/checkout@v4
119+
120+
- name: Build bundle with flatpak-builder (flathub variant)
121+
id: build_flathub
122+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
123+
with:
124+
manifest-path: linux/io.github.gcclinux.EasyEdit-flathub.yml
125+
build-bundle: true
126+
bundle: EasyEdit-flathub.flatpak
127+
cache-key: flatpak-24.08-flathub
128+
# The skeleton may not fully build until TODOs are completed; allow failures on PRs if desired
129+
# verbose: true
130+
131+
- name: Upload flathub bundle artifact
132+
if: always()
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: EasyEdit-flathub.flatpak
136+
path: EasyEdit-flathub.flatpak

docs-site/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import UMLExamples from './pages/docs/UMLExamples'
1111
import NomnomlGuide from './pages/docs/NomnomlGuide'
1212
import TemplatesGuide from './pages/docs/TemplatesGuide'
1313
import MermaidGuide from './pages/docs/MermaidGuide'
14+
import CustomThemes from './pages/docs/CustomThemes'
1415

1516
function App() {
1617
const location = useLocation()
@@ -32,6 +33,7 @@ function App() {
3233
<Route path="docs/nomnoml-guide" element={<NomnomlGuide />} />
3334
<Route path="docs/templates-guide" element={<TemplatesGuide />} />
3435
<Route path="docs/mermaid-guide" element={<MermaidGuide />} />
36+
<Route path="docs/custom-themes" element={<CustomThemes />} />
3537
</Route>
3638
</Routes>
3739
)

0 commit comments

Comments
 (0)