Standardisation
This commit is contained in:
parent
cf848b643d
commit
6baa74c751
6 changed files with 101 additions and 17 deletions
2
.actrc
2
.actrc
|
|
@ -1,7 +1,7 @@
|
|||
--bind
|
||||
--action-cache-path .github/cache/act/actions
|
||||
--artifact-server-path .github/cache/act/artifacts
|
||||
--artifact-server-port 34566
|
||||
--artifact-server-port 34564
|
||||
--cache-server-path .github/cache/act/cache
|
||||
--use-new-action-cache
|
||||
--platform self-hosted=ghcr.io/catthehacker/ubuntu:act-latest
|
||||
|
|
|
|||
34
.github/workflows/php.yml
vendored
34
.github/workflows/php.yml
vendored
|
|
@ -9,8 +9,12 @@ permissions:
|
|||
contents: read
|
||||
packages: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
php-flavours-build:
|
||||
build:
|
||||
name: "Build PHP Flavours"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
|
@ -19,18 +23,18 @@ jobs:
|
|||
matrix:
|
||||
variant:
|
||||
- cli
|
||||
- nginx
|
||||
- apache
|
||||
#- nginx
|
||||
#- apache
|
||||
version:
|
||||
- "7.0"
|
||||
- "7.1"
|
||||
- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
- "8.1"
|
||||
#- "7.0"
|
||||
#- "7.1"
|
||||
#- "7.2"
|
||||
#- "7.3"
|
||||
#- "7.4"
|
||||
#- "8.0"
|
||||
#- "8.1"
|
||||
- "8.2"
|
||||
- "8.3"
|
||||
#- "8.3"
|
||||
env:
|
||||
PHP_PACKAGES_70: git mariadb-client php7.0-apcu php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-gd php7.0-imap php7.0-imagick php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-memcache php7.0-memcached php7.0-mongodb php7.0-mysql php7.0-opcache php7.0-pgsql php7.0-phpdbg php7.0-pspell php7.0-redis php7.0-soap php7.0-sqlite php7.0-xdebug php7.0-xml php7.0-zip postgresql-client
|
||||
PHP_PACKAGES_71: git mariadb-client php7.1-apcu php7.1-bcmath php7.1-bz2 php7.1-cli php7.1-curl php7.1-gd php7.1-imap php7.1-imagick php7.1-intl php7.1-json php7.1-ldap php7.1-mbstring php7.1-mcrypt php7.1-memcache php7.1-memcached php7.1-mongodb php7.1-mysql php7.1-opcache php7.1-pgsql php7.1-phpdbg php7.1-pspell php7.1-redis php7.1-soap php7.1-sqlite php7.1-xdebug php7.1-xml php7.1-zip postgresql-client
|
||||
|
|
@ -85,13 +89,11 @@ jobs:
|
|||
password: ${{ secrets.GHCR_PASSWORD }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: php
|
||||
|
||||
- uses: docker/build-push-action@v5
|
||||
name: "Build: Build & Push"
|
||||
with:
|
||||
context: php
|
||||
context: .
|
||||
target: php-${{ matrix.variant }}
|
||||
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
|
||||
pull: true
|
||||
|
|
@ -116,11 +118,11 @@ jobs:
|
|||
ghcr.io/benzine-framework/php:${{ matrix.variant }}-${{ matrix.version }} \
|
||||
/usr/bin/install-report
|
||||
|
||||
php-vanity-tags:
|
||||
tags:
|
||||
name: Vanity Tags
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- php-flavours-build
|
||||
- build
|
||||
env:
|
||||
latest-stable-version: "8.3"
|
||||
base_tag: "ghcr.io/benzine-framework/php"
|
||||
|
|
|
|||
24
.github/workflows/trunk.cache.yml
vendored
Normal file
24
.github/workflows/trunk.cache.yml
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
name: Trunk Cache
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: [.trunk/trunk.yaml]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
trunk-cache:
|
||||
name: Trunk Cache
|
||||
runs-on: self-hosted
|
||||
permissions:
|
||||
actions: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Trunk Check
|
||||
uses: trunk-io/trunk-action@v1
|
||||
with:
|
||||
check-mode: populate_cache_only
|
||||
27
.github/workflows/trunk.check.yml
vendored
Normal file
27
.github/workflows/trunk.check.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Code Quality Check (Trunk)
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
trunk-check:
|
||||
name: Trunk Check Runner
|
||||
runs-on: self-hosted
|
||||
permissions:
|
||||
checks: write # For trunk to post annotations
|
||||
contents: read # For repo checkout
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: ${{ !env.ACT }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Trunk Check
|
||||
if: ${{ !env.ACT }}
|
||||
uses: trunk-io/trunk-action@v1
|
||||
30
.github/workflows/trunk.upgrade.yml
vendored
Normal file
30
.github/workflows/trunk.upgrade.yml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: Trunk Upgrade
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 8 * * 2 # Every Tuesday at 8am
|
||||
workflow_dispatch: {}
|
||||
|
||||
permissions: read-all
|
||||
jobs:
|
||||
trunk-upgrade:
|
||||
name: Upgrade Trunk
|
||||
runs-on: ubuntu-latest # MB: For some reason, the action doesn't work on self-hosted runners. I've not got time to investigate why right now but its so low-frequency and fast that it doesn't matter.
|
||||
permissions:
|
||||
contents: write # For trunk to create PRs
|
||||
pull-requests: write # For trunk to create PRs
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: "Trunk Upgrade"
|
||||
uses: trunk-io/trunk-action/upgrade@v1
|
||||
- name: "PR: Find Pull Request"
|
||||
uses: juliangruber/find-pull-request-action@v1
|
||||
id: find-pull-request
|
||||
with:
|
||||
labels: trunk
|
||||
- name: "PR: Enable Pull Request Automerge"
|
||||
continue-on-error: true
|
||||
uses: peter-evans/enable-pull-request-automerge@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
pull-request-number: ${{ steps.find-pull-request.outputs.number }}
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@
|
|||
/Makefile.working
|
||||
/qemu-*-static*
|
||||
/.secrets
|
||||
/.github/cache
|
||||
Loading…
Reference in a new issue