-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
force-commit to main to test workflow.
- Loading branch information
1 parent
2ac159f
commit 32f6a6b
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Composer Install | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
composer-install: | ||
name: Composer Install | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure PHP environment | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
tools: composer:2 | ||
php-version: '8.2' | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install 1Password CLI | ||
uses: 1password/install-cli-action@v1 | ||
|
||
- name: Create auth.json via 1Password CLI | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
run: | | ||
op user get --me | ||
op inject -i auth.template.json -o auth.json | ||
- name: Install Composer | ||
run: | | ||
composer install --ignore-platform-reqs --optimize-autoloader --no-progress | ||
rm auth.json |