mirror of
https://github.com/EdyTheCow/docker-whmcs.git
synced 2026-04-02 18:58:18 +00:00
Trying my luck with workflows again...
This commit is contained in:
42
.github/workflows/build-image-common.yml
vendored
Normal file
42
.github/workflows/build-image-common.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Build & Push Docker Image Common
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
context:
|
||||
required: true
|
||||
type: string
|
||||
image_tag:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GITHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build & push image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ${{ inputs.context }}
|
||||
push: true
|
||||
tags: ${{ inputs.image_tag }}
|
||||
19
.github/workflows/build-whmcs-nginx.yml
vendored
Normal file
19
.github/workflows/build-whmcs-nginx.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Build WHMCS NGINX
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ docker-images ]
|
||||
paths:
|
||||
- 'whmcs-nginx/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'whmcs-nginx/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build-image-common.yml
|
||||
with:
|
||||
context: whmcs-nginx
|
||||
image_tag: ghcr.io/edythecow/whmcs-nginx:latest
|
||||
secrets:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
19
.github/workflows/build-whmcs-php-fpm.yml
vendored
Normal file
19
.github/workflows/build-whmcs-php-fpm.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Build WHMCS PHP-FPM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ docker-images ]
|
||||
paths:
|
||||
- 'whmcs-php-fpm/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'whmcs-php-fpm/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/build-image-common.yml
|
||||
with:
|
||||
context: whmcs-php-fpm
|
||||
image_tag: ghcr.io/edythecow/whmcs-php-fpm:latest
|
||||
secrets:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
47
.github/workflows/docker-publish.yml
vendored
47
.github/workflows/docker-publish.yml
vendored
@@ -1,47 +0,0 @@
|
||||
name: Build and publish WHMCS Docker images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ docker-images ]
|
||||
paths:
|
||||
- 'whmcs-php-fpm/**'
|
||||
- 'whmcs-nginx/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'whmcs-php-fpm/**'
|
||||
- 'whmcs-nginx/**'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write # required to push to ghcr.io
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build & push whmcs-php-fpm
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: whmcs-php-fpm/
|
||||
push: true
|
||||
tags: ghcr.io/edythecow/whmcs-php-fpm:latest
|
||||
|
||||
- name: Build & push whmcs-nginx
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: whmcs-nginx/
|
||||
push: true
|
||||
tags: ghcr.io/edythecow/whmcs-nginx:latest
|
||||
Reference in New Issue
Block a user