Skip to content

Build

Build #62

Workflow file for this run

name: Build
on:
workflow_dispatch:
schedule:
- cron: '5 4 * * *'
jobs:
build:
name: Update plugin
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
updated: ${{ steps.update.outputs.updated }}
version: ${{ steps.update.outputs.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Retrieve the latest version number
run: |
curl "https://kinsta.com/kinsta-tools/kinsta-mu-plugins.zip" > package.zip
{
echo 'LATEST_VERSION<<EOF'
unzip -p package.zip kinsta-mu-plugins.php | grep 'Version:' | sed 's/.*: //'
echo 'EOF'
} >> "$GITHUB_ENV"
rm package.zip
- name: Update repo
uses: generoi/github-action-update-plugins@master
id: update
with:
download_url: "https://kinsta.com/kinsta-tools/kinsta-mu-plugins.zip"
version: ${{ env.LATEST_VERSION }}
strip_archive_folder: 'false'
update-satis:
needs: build
if: needs.build.outputs.updated == 'true'
uses: generoi/packagist/.github/workflows/update.yml@master
secrets:
token: ${{ secrets.PACKAGIST_UPDATE_PAT }}