-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: initial slack alert pipeline commit
- Loading branch information
sangeet-joy_xero
committed
Oct 22, 2024
1 parent
7142037
commit cf0db65
Showing
1 changed file
with
32 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,32 @@ | ||
name: Check Packagist Publish | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: XeroAPI/xero-php-oauth2 | ||
path: xero-php-oauth2 | ||
|
||
# - name: Get package version from composer file | ||
# id: get_composer_version | ||
# run: | | ||
# COMPOSER_VERSION=$(jq -r '.version' composer.json) | ||
|
||
- name: Get latest version from packgist | ||
id: get_packagist_version | ||
run: | | ||
PACKAGE_NAME=$(jq -r '.name' composer.json) | ||
echo "package name - $PACKAGE_NAME" | ||
RESPONSE=$(curl -s https://packagist.org/packages/${PACKAGE_NAME}.json) | ||
LATEST_VERSION=$(echo $RESPONSE | jq -r '.package.versions[0].version') | ||
echo "latest packagist version $LATEST_VERSION" |