From 32f6a6b5126f716d0eac0d725eab1c99424c7d72 Mon Sep 17 00:00:00 2001 From: David Paul Ellenwood Date: Wed, 20 Nov 2024 15:09:22 -0600 Subject: [PATCH] force-commit to main to test workflow. --- .github/workflows/composer-install.yml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/composer-install.yml diff --git a/.github/workflows/composer-install.yml b/.github/workflows/composer-install.yml new file mode 100644 index 00000000..415a1565 --- /dev/null +++ b/.github/workflows/composer-install.yml @@ -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