Recent PECL Releases #6127
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
# yamllint disable rule:line-length | |
name: Recent PECL Releases | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "17,57 0,6,12,18 * * *" | |
jobs: | |
check_releases: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: yaml | |
tools: none | |
# see https://github.com/marketplace/actions/import-gpg | |
- name: Import GPG Key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_config_global: true | |
git_user_signingkey: true | |
- name: Update GITHUB_ENV and set git global config | |
run: | | |
echo "GIT_AUTHOR_EMAIL=$(git config --get user.email)" >> $GITHUB_ENV | |
echo "GIT_AUTHOR_NAME=$(git config --get user.name)" >> $GITHUB_ENV | |
echo "GIT_COMMITTER_EMAIL=$(git config --get user.email)" >> $GITHUB_ENV | |
echo "GIT_COMMITTER_NAME=$(git config --get user.name)" >> $GITHUB_ENV | |
echo "GIT_EMAIL=$(git config --get user.email)" >> $GITHUB_ENV | |
echo "GIT_USERNAME=$(git config --get user.name)" >> $GITHUB_ENV | |
git config --global push.autoSetupRemote true | |
git config --global commit.gpgSign true | |
git config --global tag.forceSignAnnotated true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
- name: Fetch & Commit PECL releases | |
env: | |
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
run: | | |
bin/update-latest-releases | |
if [[ -f "commit.txt" ]]; then | |
rightnow=$(date '+%F_%H%M') | |
git checkout -b "releases-${rightnow}" | |
git add rest .etags data | |
git commit -F commit.txt | |
git push | |
gh pr create --fill | |
rm commit.txt | |
sleep 3 | |
gh pr merge --auto --merge | |
fi |