Skip to content

Commit

Permalink
trigger positive build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayesh committed Dec 6, 2024
1 parent 4b4df9f commit 026da5f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 76 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/sync-pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Sync and PR

permissions:
contents: write
id-token: write
attestations: write

on:
workflow_dispatch:
workflow_call:
Expand Down Expand Up @@ -71,6 +75,11 @@ jobs:
if: contains('none', steps.version_update.outputs.new_version) == false
run: find winget-pkgs/manifests/p/PHP/PHP | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"

- uses: actions/attest-build-provenance@v2
id: attest
with:
subject-path: builder/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }}

- name: Generate commit message
id: commit_msg
if: contains('none', steps.version_update.outputs.new_version) == false
Expand All @@ -81,25 +90,23 @@ jobs:
echo "$EOF" >> $GITHUB_OUTPUT
echo "--New Version--"
echo ${{ steps.version_update.outputs.new_version }}
echo "${{ steps.version_update.outputs.new_version }}" | wc -c
echo "-${{ steps.version_update.outputs.new_version }}-" | wc -c
echo "-${{ steps.version_update.outputs.new_version }}-"
cat ${{ steps.attest.outputs.bundle-path }}
- name: Remove old files from winget-pkgs
if: contains('none', steps.version_update.outputs.new_version) == false
run: |
rm -r winget-pkgs/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }}
cp -r builder/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }} winget-pkgs/manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }}
- name: Commit data
- name: Commit data to own repo
uses: stefanzweifel/git-auto-commit-action@v5
if: contains('none', steps.version_update.outputs.new_version) == false
with:
commit_message: ${{ steps.commit_msg.outputs.commit_msg }}
branch: main
add_options: '-A'
repository: builder
tagging_message: ${{ steps.commit_msg.outputs.commit_msg }}
tagging_message: ${{ steps.version_update.outputs.new_version }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
Expand All @@ -110,7 +117,7 @@ jobs:
body-path: builder/winget-pr-template.md
add-paths: "manifests/p/PHP/PHP/${{ matrix.php-version-major }}/${{ matrix.php-version-minor }}"
commit-message: ${{ steps.commit_msg.outputs.commit_msg }}
title: "[PHP] Add new version ${{ matrix.php-version-major }}.${{ matrix.php-version-minor }}"
title: "[PHP] Add new version `PHP.PHP.${{ matrix.php-version-major }}.${{ matrix.php-version-minor }}` - `${{ steps.version_update.outputs.new_version }}`"
committer: "Ayesh Karunaratne <ayesh@aye.sh>"
author: "Ayesh Karunaratne <ayesh@aye.sh>"
branch: "php-version-${{ matrix.php-version-major }}-${{ matrix.php-version-minor }}"
branch: "php-v-${{ steps.version_update.outputs.new_version }}"
32 changes: 0 additions & 32 deletions manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.installer.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.locale.en-US.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions manifests/p/PHP/PHP/8/4/8.4.1/PHP.PHP.8.4.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions templates/winget-pr-template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Updates `PHP.PHP.%versionmajor%.%versionminor%` to PHP `%fullversion%`

**PHP %fullversion%**
Download x86: %url-x86%
Checksum x86: %hash-x86%
Download x64: %url-x64%
Checksum x64: %hash-x64%
x86 zip Download: %url-x86%
x86 zip checksum: %hash-x86%
x64 zip Download: %url-x64%
x64 zip Checksum: %hash-x64%

Checklist for Pull Requests
- [x] Have you signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs)?
Expand Down

0 comments on commit 026da5f

Please sign in to comment.