Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 58 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: "Build Docker image"

on:
push:
paths:
- "docker/php-cli/Dockerfile"
workflow_dispatch:

concurrency:
group: docker-build
cancel-in-progress: true

jobs:
build:
name: "Build & push php-cli"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: "Get metadata"
id: meta
run: |
echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
echo "rfc3339=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"

- name: "Checkout"
uses: actions/checkout@v4

- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Setup Docker QEMU"
uses: docker/setup-qemu-action@v3

- name: "Setup Docker Buildx"
uses: docker/setup-buildx-action@v3

- name: "Build & push image"
uses: docker/build-push-action@v6
with:
context: ./docker/php-cli
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/mesilov/bitrix24-php-lib:php-cli
ghcr.io/mesilov/bitrix24-php-lib:php-cli-${{ steps.meta.outputs.short_sha }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.meta.outputs.rfc3339 }}
org.opencontainers.image.revision=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
42 changes: 15 additions & 27 deletions .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
name: "Allowed licenses checks"

on:
push:
pull_request:

jobs:
static-analysis:
name: "composer-license-checker"
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/mesilov/bitrix24-php-lib:php-cli
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring
tools: composer:v2

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
uses: actions/checkout@v4

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Install dependencies"
run: composer update --no-interaction --no-progress --no-suggest

- name: "composer-license-checker"
run: "php vendor/bin/composer-license-checker"
run: php vendor/bin/composer-license-checker

- name: "is allowed licenses check succeeded"
if: ${{ success() }}
Expand All @@ -47,4 +35,4 @@ jobs:
- name: "is allowed licenses check failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ allowed licenses check failed (╯°益°)╯彡┻━┻'
echo '::error:: ❗️ allowed licenses check failed (╯°益°)╯彡┻━┻'
45 changes: 16 additions & 29 deletions .github/workflows/lint-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
name: Lint CS-Fixer

on:
push:
pull_request:

name: Lint CS-Fixer

jobs:
static-analysis:
name: "CS-Fixer"
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/mesilov/bitrix24-php-lib:php-cli
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring
tools: composer:v2

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
uses: actions/checkout@v4

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Install dependencies"
run: composer update --no-interaction --no-progress --no-suggest

- name: "CS-Fixer"
run: "vendor/bin/php-cs-fixer fix --dry-run --diff --verbose"
run: vendor/bin/php-cs-fixer fix --dry-run --diff --verbose

- name: "is CS-Fixer check succeeded"
if: ${{ success() }}
Expand All @@ -48,4 +35,4 @@ jobs:
- name: "is CS-Fixer check failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ CS-Fixer check failed (╯°益°)╯彡┻━┻'
echo '::error:: ❗️ CS-Fixer check failed (╯°益°)╯彡┻━┻'
45 changes: 16 additions & 29 deletions .github/workflows/lint-phpstan.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
name: PHPStan lint checks

on:
push:
pull_request:

name: PHPStan lint checks

jobs:
static-analysis:
name: "PHPStan"
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/mesilov/bitrix24-php-lib:php-cli
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring
tools: composer:v2

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
uses: actions/checkout@v4

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Install dependencies"
run: composer update --no-interaction --no-progress --no-suggest

- name: "PHPStan"
run: "vendor/bin/phpstan --memory-limit=2G analyse"
run: vendor/bin/phpstan --memory-limit=2G analyse

- name: "is PHPStan check succeeded"
if: ${{ success() }}
Expand All @@ -48,4 +35,4 @@ jobs:
- name: "is PHPStan check failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ PHPStan check failed (╯°益°)╯彡┻━┻'
echo '::error:: ❗️ PHPStan check failed (╯°益°)╯彡┻━┻'
45 changes: 16 additions & 29 deletions .github/workflows/lint-rector.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
name: Rector lint checks

on:
push:
pull_request:

name: Rector lint checks

jobs:
static-analysis:
name: "Rector"
runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
dependencies: [ highest ]
operating-system: [ ubuntu-latest]
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
container:
image: ghcr.io/mesilov/bitrix24-php-lib:php-cli
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: json, bcmath, curl, intl, mbstring
tools: composer:v2

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
uses: actions/checkout@v4

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Install dependencies"
run: composer update --no-interaction --no-progress --no-suggest

- name: "Rector"
run: "vendor/bin/rector process --dry-run"
run: vendor/bin/rector process --dry-run

- name: "is Rector check succeeded"
if: ${{ success() }}
Expand All @@ -48,4 +35,4 @@ jobs:
- name: "is PHPStan check failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️ Rector check failed (╯°益°)╯彡┻━┻'
echo '::error:: ❗️ Rector check failed (╯°益°)╯彡┻━┻'
Loading