Skip to content

Commit d161bab

Browse files
committed
new README workflow
1 parent 7754585 commit d161bab

File tree

8 files changed

+58
-93
lines changed

8 files changed

+58
-93
lines changed

.github/workflows/docker.yml

+33-13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
required: false
99
default: 'false'
1010

11+
readme:
12+
description: 'set WORKFLOW_GITHUB_README'
13+
required: false
14+
default: 'false'
15+
1116
image:
1217
description: 'set IMAGE'
1318
required: false
@@ -32,13 +37,16 @@ jobs:
3237
docker:
3338
runs-on: ubuntu-22.04
3439
permissions:
40+
actions: read
3541
contents: write
3642
packages: write
3743
security-events: write
3844

3945
steps:
4046
- name: init / checkout
4147
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
48+
with:
49+
ref: master
4250

4351
- name: init / inputs to env
4452
if: github.event_name == 'workflow_dispatch'
@@ -62,8 +70,10 @@ jobs:
6270
6371
: # set defaults
6472
echo "IMAGE_ARCH=${json_arch:-linux/amd64,linux/arm64}" >> $GITHUB_ENV
65-
echo "WORKFLOW_GRYPE_SEVERITY_CUTOFF=${json_grype_severity:-high}" >> $GITHUB_ENV;
6673
echo "WORKFLOW_GITHUB_RELEASE=${input_release:-true}" >> $GITHUB_ENV;
74+
echo "WORKFLOW_GITHUB_README=${input_readme:-true}" >> $GITHUB_ENV;
75+
echo "WORKFLOW_GRYPE_SCAN=${json_grype_scan:-true}" >> $GITHUB_ENV;
76+
echo "WORKFLOW_GRYPE_SEVERITY_CUTOFF=${json_grype_severity:-high}" >> $GITHUB_ENV;
6777
6878
: # create tags for semver, stable and other shenanigans
6979
LOCAL_SHA=$(git rev-parse --short HEAD)
@@ -76,7 +86,7 @@ jobs:
7686
LOCAL_TAGS="${LOCAL_IMAGE}:${LOCAL_SHA}"
7787
if [ ! -z ${input_semverprefix} ]; then LOCAL_SEMVER_PREFIX="${input_semverprefix}-"; fi
7888
if [ ! -z ${input_semversuffix} ]; then LOCAL_SEMVER_SUFFIX="-${input_semversuffix}"; fi
79-
if [ ! -z ${json_semver_rc} ]; then LOCAL_SEMVER_RC="-${json_semver_rc}"; fi
89+
if [ ! -z ${json_semver_rc} ]; then LOCAL_SEMVER_RC="${json_semver_rc}"; fi
8090
if [ ! -z ${LOCAL_SEMVER_MAJOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_SEMVER_MAJOR}${LOCAL_SEMVER_SUFFIX}"; fi
8191
if [ ! -z ${LOCAL_SEMVER_MINOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}${LOCAL_SEMVER_SUFFIX}"; fi
8292
if [ ! -z ${LOCAL_SEMVER_PATCH} ]; then LOCAL_TAGS="${LOCAL_TAGS},${LOCAL_IMAGE}:${LOCAL_SEMVER_PREFIX}${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}.${LOCAL_SEMVER_PATCH}${LOCAL_SEMVER_SUFFIX}"; fi
@@ -89,7 +99,7 @@ jobs:
8999
if [ ! -z ${input_uid} ]; then echo "IMAGE_UID=${input_uid}" >> $GITHUB_ENV; else echo "IMAGE_UID=${json_uid:-1000}" >> $GITHUB_ENV; fi
90100
if [ ! -z ${input_gid} ]; then echo "IMAGE_GID=${input_gid}" >> $GITHUB_ENV; else echo "IMAGE_GID=${json_gid:-1000}" >> $GITHUB_ENV; fi
91101
92-
: # set rc, prefix or suffix globally
102+
: # set rc, prefix or suffix globally for semver and version
93103
echo "IMAGE_SEMVER_PREFIX=${LOCAL_SEMVER_PREFIX}" >> $GITHUB_ENV
94104
echo "IMAGE_SEMVER_SUFFIX=${LOCAL_SEMVER_SUFFIX}" >> $GITHUB_ENV
95105
echo "IMAGE_VERSION_RC=${LOCAL_SEMVER_RC}" >> $GITHUB_ENV
@@ -131,22 +141,14 @@ jobs:
131141
${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}grype${{ env.IMAGE_SEMVER_SUFFIX }}
132142
133143
- name: grype / scan
144+
if: env.WORKFLOW_GRYPE_SCAN == 'true'
134145
id: grype-scan
135146
uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
136147
with:
137148
image: ${{ env.IMAGE }}:${{ env.IMAGE_SEMVER_PREFIX }}grype${{ env.IMAGE_SEMVER_SUFFIX }}
138149
severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
139150
by-cve: true
140151
output-format: 'sarif'
141-
output-file: ${{ runner.temp }}/_github_home/grype.sarif
142-
143-
- name: grype / report / sarif to markdown
144-
id: sarif-to-md
145-
if: success() || failure()
146-
continue-on-error: true
147-
uses: 11notes/action-sarif-to-markdown@bc689850bd33a1037ea1d0a609ab4ea14b3c4396
148-
with:
149-
sarif_file: grype.sarif
150152

151153
- name: grype / delete tag
152154
if: steps.grype-tag.outcome == 'success'
@@ -157,11 +159,13 @@ jobs:
157159
--header 'content-type: application/json' \
158160
--fail
159161
160-
- name: grype / report / upload
162+
- name: codeql / upload
163+
id: codeql-upload
161164
if: steps.grype-scan.outcome == 'success'
162165
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
163166
with:
164167
sarif_file: ${{ steps.grype-scan.outputs.sarif }}
168+
wait-for-processing: false
165169
category: grype
166170

167171
- name: docker / build & push
@@ -212,6 +216,22 @@ jobs:
212216
}' \
213217
--fail
214218
219+
- name: github / create README.md
220+
if: env.WORKFLOW_GITHUB_README == 'true'
221+
id: github-readme
222+
uses: 11notes/[email protected]
223+
with:
224+
sarif_file: ${{ steps.grype-scan.outputs.sarif }}
225+
226+
- name: github / commit & push
227+
if: steps.github-readme.outcome == 'success'
228+
run: |
229+
git config user.name "github-actions[bot]"
230+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
231+
git add .
232+
git commit -m "update README.md"
233+
git push
234+
215235
- name: docker / push README.md to docker hub
216236
if: hashFiles('README.md') != ''
217237
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8

.github/workflows/tags.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
with:
1313
workflow: docker.yml
1414
token: "${{ secrets.REPOSITORY_TOKEN }}"
15-
inputs: '{ "release":"true" }'
15+
inputs: '{ "release":"true", "readme":"true" }'
1616

1717
docker-unraid:
1818
runs-on: ubuntu-latest
@@ -22,4 +22,4 @@ jobs:
2222
with:
2323
workflow: docker.yml
2424
token: "${{ secrets.REPOSITORY_TOKEN }}"
25-
inputs: '{ "release":"false", "uid":"99", "gid":"100", "semversuffix":"unraid" }'
25+
inputs: '{ "release":"false", "readme":"false", "uid":"99", "gid":"100", "semversuffix":"unraid" }'

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
maintain/
2-
project*
1+
maintain/

.json

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"description":"Activate any version of Windows and Office, forever",
1414
"parent":{
1515
"image":"11notes/kms:465f4d1"
16+
},
17+
"built":{
18+
"py-kms":"https://github.com/Py-KMS-Organization/py-kms",
19+
"CustomIcon/pykms-frontend":"https://github.com/CustomIcon/pykms-frontend"
1620
}
1721
}
1822
}

README.md

-76
This file was deleted.

img/GUI.png

-52.4 KB
Binary file not shown.

img/webGUICustomIcon.png

37.7 KB
Loading

project.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
![Web GUI](https://github.com/11notes/docker-${{ json_name }}/blob/master/img/webGUICustomIcon.png?raw=true)
2+
3+
${{ content_synopsis }} This image will run a web GUI for your [11notes/kms](https://hub.docker.com/r/11notes/kms) server.
4+
5+
${{ content_compose }}
6+
7+
${{ content_defaults }}
8+
9+
${{ content_environment }}
10+
| `KMS_GUI_STYLE` | switch the UI style of the webinterface (py-kms, custom-icon) | custom-icon, py-kms |
11+
12+
${{ content_source }}
13+
14+
${{ content_parent }}
15+
16+
${{ content_built }}
17+
18+
${{ content_tips }}

0 commit comments

Comments
 (0)