Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #5 GitHub Action Semantic Checker #11

Merged
Merged
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/semantic-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: MageOS Semantic Checker
run-name: ${{ github.actor }} is checking the semantic version
on: [pull_request]
jobs:
semantic-version:
runs-on: ubuntu-latest
steps:
- name: Environment Debugging Output
run: |
echo "Event_path: ${GITHUB_EVENT_PATH}"
echo "Event: ${{ github.event }}"
- name: Check out Semamtic Version Checker tool
uses: actions/checkout@v3
with:
repository: magento/magento-semver
Vinai marked this conversation as resolved.
Show resolved Hide resolved
path: magento-semver
- name: Check out MageOS - ${{ github.base_ref }}
uses: actions/checkout@v3
with:
path: mageos-magento2
# Change this to compare new code to other branches
ref: ${{ github.base_ref }}
- name: Check out new changes - ${{ github.head_ref }}
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: this-change
ref: ${{ github.head_ref }}
- name: Install Composer
uses: php-actions/composer@v6
with:
command: help
- name: Get Composer Cache Directory
id: composer-cache
run: |
cd magento-semver &&
echo "{composer_cache_dir}={$(composer config cache-files-dir)} >> $GITHUB_OUTPUT"
- name: Install Composer Cache
uses: actions/cache@v3
with:
path: echo "${{ steps.composer-cache.outputs.composer_cache_dir }}"
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Semamtic Version Checker
run: cd magento-semver && composer install
- name: Run Semantic Version Checker (SVC)
run: magento-semver/bin/svc compare mageos-magento2 this-change
- name: Upload SVC output file
uses: actions/upload-artifact@v3
with:
name: svc-log-file
path: svc.log