Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEXT 2 #73

Merged
merged 48 commits into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e686442
chore: cleanup
schuer Dec 9, 2023
9bde37d
build: add config
schuer Dec 9, 2023
d312a7a
build: set up deno
schuer Dec 9, 2023
73bd1b5
build: add source files
schuer Dec 9, 2023
799fd8c
build: add scripts
schuer Dec 9, 2023
3bfefd1
ci: add github workflows
schuer Dec 9, 2023
932073e
build: rRRR!
FriendsOfREDAXO-T Dec 9, 2023
f0847c4
build: generate tag list
schuer Dec 9, 2023
ce74918
build: rRRR!
FriendsOfREDAXO-T Dec 9, 2023
7c849ab
refactor: naming structure
schuer Dec 10, 2023
7073f6f
ci: refactor workflows
schuer Dec 10, 2023
37e2b60
ci: lint yml files
schuer Dec 10, 2023
722bbac
cleanup, force GH to use the new publish workflow
schuer Dec 10, 2023
65f8218
test
schuer Dec 10, 2023
9a23d89
test
schuer Dec 10, 2023
574029b
test
schuer Dec 10, 2023
ddf0e8d
ci: implement test workflow
schuer Dec 11, 2023
0520503
test
schuer Dec 11, 2023
b04eca6
test
schuer Dec 11, 2023
e4bf3c7
GenerRRRRR-ate image files from source!
FriendsOfREDAXO-T Dec 11, 2023
cb7461c
remove deprecated opcache.fast_shutdown config
schuer Dec 13, 2023
668f01c
use php apache image
schuer Dec 13, 2023
0d579bc
fix ldd logic for bookworm/usrmerge
schuer Dec 13, 2023
b7464d2
GenerRRRRR-ate image files from source!
FriendsOfREDAXO-T Dec 13, 2023
b1ae5f3
ci: run tests without entypoint script
schuer Dec 13, 2023
ca63497
ci: test and publish
schuer Dec 13, 2023
813e8cf
test and publish
schuer Dec 13, 2023
bee2b0a
test
schuer Dec 13, 2023
7c7c81e
disable imagick for now due to php 8.2/8.3 compatibility issues
schuer Dec 13, 2023
d976cd2
GenerRRRRR-ate image files from source!
FriendsOfREDAXO-T Dec 13, 2023
f889b81
add extension again
schuer Dec 13, 2023
ea89138
GenerRRRRR-ate image files from source!
FriendsOfREDAXO-T Dec 13, 2023
3fba37e
remove default-ssl
schuer Dec 15, 2023
7cf2921
GenerRRRRR-ate image files from source!
FriendsOfREDAXO-T Dec 15, 2023
4edac2d
ci: workflows
schuer Dec 16, 2023
35dfe2c
test
schuer Dec 16, 2023
d99bf52
ci: remove cache
schuer Dec 16, 2023
74d21b0
lint
schuer Dec 16, 2023
790d88a
ci: workflows
schuer Dec 17, 2023
66d0bd1
ci: yq
schuer Dec 17, 2023
664b33c
ci: publish workflow
schuer Dec 23, 2023
f5cf60d
ci: publish workflow
schuer Dec 23, 2023
27ea2b8
ci: publish workflow
schuer Dec 23, 2023
e238d9b
ci: publish workflow
schuer Dec 23, 2023
09e580d
docs: readme
schuer Dec 24, 2023
9298cae
ci: activate publish workflow
schuer Dec 24, 2023
96f98fe
docs: developers (wip)
schuer Dec 24, 2023
114e3ff
ci: publish to docker hub
schuer Dec 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
21 changes: 0 additions & 21 deletions .github/workflows/dockerpush.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Generate

on:
pull_request:
paths:
- "source/**/*"

concurrency:
# Cancel in-progress jobs if a new job is trigged by a commit from the same branch
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
generate:
name: Generate image files from source
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Ref is required if auto-commit action is used in pull requests.
# https://github.com/stefanzweifel/git-auto-commit-action#checkout-the-correct-branch
ref: ${{ github.head_ref }}
# Token is required to trigger new workflow runs after auto-commit action.
# https://github.com/stefanzweifel/git-auto-commit-action#commits-made-by-this-action-do-not-trigger-new-workflow-runs
token: ${{ secrets.GH_WORKFLOW }}

- name: Setup Deno
# https://github.com/marketplace/actions/setup-deno
uses: denoland/setup-deno@v1
with:
deno-version: "^1"

- name: Run generator script
run: deno task start

- name: Auto-commit changed files
# Automatically commit files which have been changed during the workflow run and push changes back
# to remote repository.
# https://github.com/marketplace/actions/git-auto-commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "GenerRRRRR-ate image files from source!"
commit_user_name: "FriendsOfREDAXO-T"
commit_user_email: "FriendsOfREDAXO-T@users.noreply.github.com"
commit_author: "FriendsOfREDAXO-T <FriendsOfREDAXO-T@users.noreply.github.com>"
file_pattern: "images/**/*"
127 changes: 127 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Publish

on:
push:
branches:
- "main"
paths:
- "images/**/*"
# add workflow dispatch to manually publish the current images
workflow_dispatch:
pull_request:
paths:
- "images/**/*"

concurrency:
# Cancel in-progress jobs if a new job is trigged by a commit from the same branch
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
REGISTRY_IMAGE: friendsofredaxo/redaxo

jobs:
collect:
name: Collect images from directories
runs-on: ubuntu-latest
outputs:
IMAGES: ${{ steps.images.outputs.directories }}

steps:
- name: Checkout repository
# https://github.com/actions/checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Collect images from directories
id: images
run: |
cd images
directories=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name)')
echo $directories
echo "directories=$directories" >> $GITHUB_OUTPUT

publish:
name: Publish
runs-on: ubuntu-latest
needs: [collect]

strategy:
fail-fast: false
matrix:
image: ${{ fromJson(needs.collect.outputs.IMAGES) }}

steps:
- name: Checkout repository
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Create tag list for image
# We make use of yp (https://mikefarah.gitbook.io/yq/) to create a taglist from
# the image’s `tags.yml` file, where all given tags (like `5-stable`, `5-edge`) are
# combined with all image registries (like ghcr, Docker Hub).
run: |
taglist=$(yq 'map(
(
"friendsofredaxo/redaxo",
"ghcr.io/friendsofredaxo/redaxo"
)
+ ":" + .[]) | to_csv' ./images/${{ matrix.image }}/tags.yml)
echo "$taglist"
echo "TAGLIST=$taglist" >> $GITHUB_ENV

- name: Set up QEMU
# https://github.com/marketplace/actions/docker-setup-qemu
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
# https://github.com/marketplace/actions/docker-setup-buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
# https://github.com/marketplace/actions/docker-login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
# https://github.com/marketplace/actions/docker-login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
# https://github.com/marketplace/actions/build-and-push-docker-images
uses: docker/build-push-action@v5
with:
context: ./images/${{ matrix.image }}
platforms: linux/amd64,linux/arm64
push: true
provenance: false
tags: ${{ env.TAGLIST }}

- name: Update repo description
# https://github.com/marketplace/actions/docker-hub-description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ github.repository }}
short-description: ${{ github.event.repository.description }}
enable-url-completion: true

- name: Delete untagged containers from GitHub Container Registry
# https://github.com/marketplace/actions/delete-untagged-ghcr
uses: Chizkiyahu/delete-untagged-ghcr-action@v3
with:
token: ${{ secrets.GH_PACKAGES }}
untagged_only: true
owner_type: org
except_untagged_multiplatform: true
58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test

on:
pull_request:
paths:
- "images/**/*"

concurrency:
# Cancel in-progress jobs if a new job is trigged by a commit from the same branch
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
collect:
name: Collect images from directories
runs-on: ubuntu-latest
outputs:
IMAGES: ${{ steps.images.outputs.directories }}

steps:
- name: Checkout repository
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Collect images from directories
id: images
run: |
cd images
directories=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name)')
echo $directories
echo "directories=$directories" >> $GITHUB_OUTPUT

test:
name: Test
runs-on: ubuntu-latest
needs: [collect]

strategy:
fail-fast: false
matrix:
image: ${{ fromJson(needs.collect.outputs.IMAGES) }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build and push
# https://github.com/marketplace/actions/build-and-push-docker-images
uses: docker/build-push-action@v5
with:
context: ./images/${{ matrix.image }}
load: true
tags: ${{ matrix.image }}
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"deno.enable": true,
"deno.unstable": true,
"deno.importMap": "deno.json"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Friends Of REDAXO
Copyright (c) 2023 Friends Of REDAXO

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 3 additions & 0 deletions README-developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dokumentation für Entwickelnde

TODO
Loading