mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
feat(get-composer-version): create new action (#145)
This creates a new A Github Action that determines the currently installed version of Composer. Co-authored-by: Vitaliy Golomoziy <vitaliy.golomoziy@gmail.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: Get Composer Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- testing
|
||||
paths:
|
||||
- ".github/workflows/_internal-get-composer-version.yaml"
|
||||
- "get-composer-version/**"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/_internal-get-composer-version.yaml"
|
||||
- "get-composer-version/**"
|
||||
- "!(**/*.md)"
|
||||
|
||||
jobs:
|
||||
get-composer-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set PHP Version
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
tools: composer:v2.4.2
|
||||
|
||||
- uses: ./get-composer-version
|
||||
id: composer-version
|
||||
|
||||
|
||||
- name: Fail if versions do not match
|
||||
if: steps.composer-version.outputs.version != '2.4.2'
|
||||
shell: bash
|
||||
run: echo "${{ steps.composer-version.outputs.version }}" && exit 1
|
||||
|
||||
Reference in New Issue
Block a user