Compare commits
21 commits
Author | SHA1 | Date | |
---|---|---|---|
a82d1bb047 | |||
afda9d5414 | |||
523b49acb1 | |||
ecc81f1f12 | |||
1a7829f6ed | |||
ed0e028ade | |||
b839662c83 | |||
c77245ec85 | |||
bb42d0c786 | |||
30c682209a | |||
fbceb71ab4 | |||
a70d9e73dc | |||
173ee39e69 | |||
21865b2684 | |||
8ed1b9a778 | |||
ab108102d4 | |||
d44760b02e | |||
9606857714 | |||
8ccd3b3d6f | |||
b9045f12f9 | |||
539e845ad0 |
3 changed files with 101 additions and 10 deletions
|
@ -36,13 +36,23 @@ jobs:
|
|||
git tag "${{ steps.version.outputs.version }}" -m "[forgejo-action-tag]"
|
||||
git push origin --tags
|
||||
|
||||
docker-build:
|
||||
runs-on: host
|
||||
|
||||
webserver:
|
||||
env:
|
||||
REPO_NAME: alpine-php8-webserver
|
||||
needs:
|
||||
- release
|
||||
- release
|
||||
outputs:
|
||||
version: ${{ needs.release.outputs.version }}
|
||||
runs-on: host
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://git.h2-invent.com
|
||||
repository: Public-System-Design/${{ env.REPO_NAME }}
|
||||
ref: main
|
||||
path: ${{ env.REPO_NAME }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
|
@ -50,9 +60,48 @@ jobs:
|
|||
registry: git.h2-invent.com
|
||||
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
|
||||
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
|
||||
|
||||
- name: Build and push
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./${{ env.REPO_NAME }}
|
||||
push: true
|
||||
tags: git.h2-invent.com/public-system-design/alpine-php8-webserver:${{ needs.release.outputs.version }},git.h2-invent.com/public-system-design/alpine-php8-webserver:latest
|
||||
tags: |
|
||||
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:${{ needs.release.outputs.version }}
|
||||
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:latest
|
||||
build-args: |
|
||||
VERSION=${{ needs.release.outputs.version }}
|
||||
|
||||
cron:
|
||||
env:
|
||||
REPO_NAME: alpine-php8-cron-webserver
|
||||
needs:
|
||||
- webserver
|
||||
runs-on: host
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://git.h2-invent.com
|
||||
repository: Public-System-Design/${{ env.REPO_NAME }}
|
||||
ref: main
|
||||
path: ${{ env.REPO_NAME }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.h2-invent.com
|
||||
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
|
||||
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./${{ env.REPO_NAME }}
|
||||
push: true
|
||||
tags: |
|
||||
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:${{ needs.webserver.outputs.version }}
|
||||
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:latest
|
||||
build-args: |
|
||||
VERSION=${{ needs.webserver.outputs.version }}
|
||||
|
||||
|
|
40
.forgejo/workflows/docker-build.yml
Normal file
40
.forgejo/workflows/docker-build.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Build and Push Image
|
||||
description: Builds and pushes a Docker image.
|
||||
|
||||
inputs:
|
||||
repo_name:
|
||||
description: "Name of the repo (also used as build context path)"
|
||||
required: true
|
||||
version:
|
||||
description: "Version tag"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: host
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://git.h2-invent.com
|
||||
repository: Public-System-Design/${{ inputs.repo_name }}
|
||||
ref: main
|
||||
path: ${{ inputs.repo_name }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.h2-invent.com
|
||||
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
|
||||
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./${{ inputs.repo_name }}
|
||||
push: true
|
||||
tags: |
|
||||
git.h2-invent.com/public-system-design/${{ inputs.repo_name }}:${{ inputs.version }}
|
||||
git.h2-invent.com/public-system-design/${{ inputs.repo_name }}:latest
|
||||
build-args: |
|
||||
VERSION=${{ inputs.version }}
|
|
@ -57,7 +57,7 @@ http {
|
|||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args&$args;
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
# Redirect server error pages to the static page /50x.html
|
||||
|
@ -66,9 +66,11 @@ http {
|
|||
root /var/lib/nginx/html;
|
||||
}
|
||||
|
||||
location ~ ^/theme/.*\.(ico|jpg|jpeg|png|webp)$ {
|
||||
root /var/www/html/public;
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
location ^~ /theme/ {
|
||||
alias /var/www/html/public/theme/;
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
expires 30d;
|
||||
access_log off;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue