mirror of
https://github.com/5etools-mirror-2/5etools-img.git
synced 2025-10-29 03:15:32 -05:00
v1.198.1
This commit is contained in:
28
.dockerignore
Normal file
28
.dockerignore
Normal file
@@ -0,0 +1,28 @@
|
||||
*
|
||||
|
||||
!docker
|
||||
|
||||
!adventure
|
||||
!backgrounds
|
||||
!bestiary
|
||||
!book
|
||||
!characters
|
||||
!charcreationoptions
|
||||
!conditionsdiseases
|
||||
!covers
|
||||
!decks
|
||||
!deities
|
||||
!dmscreen
|
||||
!feats
|
||||
!items
|
||||
!languages
|
||||
!objects
|
||||
!plutonium
|
||||
!races
|
||||
!recipes
|
||||
!spells
|
||||
!traps
|
||||
!variantrules
|
||||
!vehicles
|
||||
|
||||
!*.webp
|
||||
7
.editorconfig
Normal file
7
.editorconfig
Normal file
@@ -0,0 +1,7 @@
|
||||
[*]
|
||||
charset=utf-8
|
||||
end_of_line=lf
|
||||
trim_trailing_whitespace=true
|
||||
insert_final_newline=true
|
||||
indent_style=tab
|
||||
indent_size=3
|
||||
26
.gitattributes
vendored
Normal file
26
.gitattributes
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
*.js text eol=lf
|
||||
*.cjs text eol=lf
|
||||
*.mjs text eol=lf
|
||||
*.json text eol=lf
|
||||
*.html text eol=lf
|
||||
*.scss text eol=lf
|
||||
*.md text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.css text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.svg text eol=lf
|
||||
*.hbs text eol=lf
|
||||
*.txt text eol=lf
|
||||
|
||||
.dockerignore text eol=lf
|
||||
.editorconfig text eol=lf
|
||||
.gitattributes text eol=lf
|
||||
.gitignore text eol=lf
|
||||
.eslintignore text eol=lf
|
||||
.eslintrc.cjs text eol=lf
|
||||
.gitmodules text eol=lf
|
||||
.node-version text eol=lf
|
||||
manifest.webmanifest text eol=lf
|
||||
docker/*.conf text eol=lf
|
||||
Dockerfile text eol=lf
|
||||
74
.github/workflows/main.yml
vendored
Normal file
74
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
name: Build and Upload Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v**'
|
||||
|
||||
# Allow running manually from the actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
|
||||
IMAGE_NAME: 5etools-img
|
||||
|
||||
concurrency:
|
||||
group: "release"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Archive Images
|
||||
run: |
|
||||
rm -rf docker Dockerfile
|
||||
mkdir -p img
|
||||
ls | grep -v img | xargs mv -t img
|
||||
zip -r -s 500m img-${{ github.ref_name }}.zip img/
|
||||
|
||||
- name: Upload Release
|
||||
# Add the files one-by-one in an effort to avoid timeouts
|
||||
# Sleep between creating the release and adding files, as the release takes time to be created (?)
|
||||
run: |
|
||||
gh release create "${{github.ref_name}}" --title "${{github.ref_name}}" --notes "Version ${{ github.ref_name }}"
|
||||
sleep 10
|
||||
for f in $(find . -name 'img-${{ github.ref_name }}.*' -print); do gh release upload ${{ github.ref_name }} $f; done
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
create-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
# See: https://stackoverflow.com/a/58178121
|
||||
- name: Set Env
|
||||
run: |
|
||||
IMAGE_VERSION=${{ github.ref_name }}
|
||||
# Strip "v" prefix from tag name
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && IMAGE_VERSION=$(echo $IMAGE_VERSION | sed -e 's/^v//')
|
||||
echo "IMAGE_VERSION=$IMAGE_VERSION" >> $GITHUB_ENV
|
||||
|
||||
echo "IMAGE_ID=$(echo ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | tr '[A-Z]' '[a-z]')" >> $GITHUB_ENV
|
||||
|
||||
# region See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
|
||||
- name: Build Image
|
||||
run: |
|
||||
docker build -t $IMAGE_NAME .
|
||||
|
||||
- name: Log In to Registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Push Image
|
||||
run: |
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo IMAGE_VERSION=$IMAGE_VERSION
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$IMAGE_VERSION
|
||||
# Always tag latest when pushing a tag, as we don't expect to ever merge old tags
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && docker tag $IMAGE_NAME $IMAGE_ID:latest
|
||||
docker push $IMAGE_ID:$IMAGE_VERSION
|
||||
docker push $IMAGE_ID:latest
|
||||
# endregion
|
||||
25
.gitignore
vendored
25
.gitignore
vendored
@@ -1,3 +1,26 @@
|
||||
desktop.ini
|
||||
node_modules
|
||||
/img/
|
||||
|
||||
# IntelliJ project files
|
||||
.idea/
|
||||
*.iml
|
||||
desktop.ini
|
||||
|
||||
# Visual Studio Code project files
|
||||
.vscode/
|
||||
|
||||
# Misc dev/scripting files
|
||||
trash
|
||||
trash_in
|
||||
|
||||
# Generated files
|
||||
sitemap.xml
|
||||
*.DS_Store
|
||||
.rsync-filter
|
||||
|
||||
# Generated service worker files
|
||||
sw.js
|
||||
sw-injector.js
|
||||
|
||||
# Log files
|
||||
*.log
|
||||
|
||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM alpine
|
||||
|
||||
RUN apk update && apk add lighttpd rsync
|
||||
|
||||
COPY docker/lighttpd.conf docker/mime-types.conf /etc/lighttpd/
|
||||
|
||||
CMD [ "lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf" ]
|
||||
EXPOSE 80
|
||||
|
||||
COPY . /var/www/localhost/htdocs/img/
|
||||
10
docker/lighttpd.conf
Normal file
10
docker/lighttpd.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
server.document-root = "/var/www/localhost/htdocs"
|
||||
|
||||
server.port = 80
|
||||
|
||||
server.username = "lighttpd"
|
||||
server.groupname = "lighttpd"
|
||||
|
||||
include "/etc/lighttpd/mime-types.conf"
|
||||
|
||||
index-file.names = ("index.html")
|
||||
1369
docker/mime-types.conf
Normal file
1369
docker/mime-types.conf
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user