Skip to content

Update dependencies #13

Update dependencies

Update dependencies #13

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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup PHP 8.2 with PHIVE
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2.29.0
with:
php-version: '8.2'
ini-values: phar.readonly=0
coverage: none
tools: phive, composer:v2
- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
- 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@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Sign PHAR
run: >
gpg
--batch
--yes
--pinentry-mode loopback
--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 # v0.1.15
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@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image (runtime-cli)
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
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@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
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