2.6.4 #66
Workflow file for this run
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
name: Trigger Satis Build | |
on: | |
release: | |
types: | |
- created | |
env: | |
VERSION: ${GITHUB_REF#refs/tags/*} | |
jobs: | |
webhook: | |
name: Send Webhook | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Validate version number | |
if: ${{ (github.repository == 'newfold-labs/wp-module-data') && (github.event.release.prerelease == false) }} | |
run: | | |
taggedVersion=${{ env.VERSION }} | |
moduleVersion=`grep "NFD_DATA_MODULE_VERSION" bootstrap.php | grep -Eo "[0-9\.]*"` | |
echo "Tagged version: $taggedVersion" | |
echo "Module version: $moduleVersion" | |
[[ "$taggedVersion" == "$moduleVersion" ]] || exit 1 | |
- name: Set Package | |
id: package | |
env: | |
REPO: ${{ github.repository }} | |
run: echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT | |
- name: Set Version | |
id: tag | |
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT | |
- name: Repository Dispatch | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.WEBHOOK_TOKEN }} | |
repository: newfold-labs/satis | |
event-type: 'satis-build' | |
client-payload: >- | |
{ | |
"vendor": "${{ github.repository_owner }}", | |
"package": "${{ steps.package.outputs.PACKAGE }}", | |
"version": "${{ steps.tag.outputs.VERSION }}" | |
} |