Skip to content

Disable PhpScoper to fix "Class name must be a valid object or a stri… #7

Disable PhpScoper to fix "Class name must be a valid object or a stri…

Disable PhpScoper to fix "Class name must be a valid object or a stri… #7

Workflow file for this run

name: Project Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout source
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Setup PHP 8.2 with PHIVE
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b
with:
php-version: '8.2'
ini-values: phar.readonly=0
coverage: none
tools: phive, composer:v2
- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6
- name: Build PHAR
run: |
phive --no-progress install --trust-gpg-keys 2DF45277AEF09A2F humbug/box
phive status
./tools/box compile
sha512sum bin/watchr.phar > bin/watchr.phar.sha512
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check that the PHAR works
run: bin/watchr.phar --ansi --version
env:
BOX_REQUIREMENTS_CHECKER_LOG_TO_STDOUT: 1
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@72b6676b71ab476b77e676928516f6982eef7a41
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Sign PHAR
run: >
gpg
--local-user [email protected]
--passphrase ${{ secrets.GPG_PASSPHRASE }}
--detach-sign
--output bin/watchr.phar.asc
bin/watchr.phar
- name: Create release
id: create_release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
draft: true
body: TODO
files: |
bin/watchr.phar
bin/watchr.phar.sha512
bin/watchr.phar.asc
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@16c0bc4a6e6ada2cfd8afd41d22d95379cf7c32a
- name: Login to GitHub Container Registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image (runtime-cli)
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
file: ./docker/Dockerfile
push: true
build-args:
"VERSION=${{ github.ref_name }}"
tags: |
ghcr.io/flavioheleno/watchr:${{ github.ref_name }}
ghcr.io/flavioheleno/watchr:latest
target: runtime-cli
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build Docker Image (standalone-cli)
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
file: ./docker/Dockerfile
push: true
build-args:
"VERSION=${{ github.ref_name }}-standalone"
tags: |
ghcr.io/flavioheleno/watchr:${{ github.ref_name }}-standalone
ghcr.io/flavioheleno/watchr:latest-standalone
target: standalone-cli
cache-from: type=gha
cache-to: type=gha,mode=max