update #22
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: Remote Dispatch Action | |
on: [repository_dispatch] | |
jobs: | |
package-push-common: | |
runs-on: windows-latest | |
outputs: | |
cleaned_version: ${{ steps.get_version.outputs.cleaned_version }} | |
steps: | |
- name: Event Information | |
id: event_info | |
run: | | |
echo "Event '${{ github.event.action }}' payload '${{ github.event.client_payload.tag }}'" | |
echo "Windows binary hash '${{ github.event.client_payload.windows_sha }}'" | |
- name: Get Version | |
id: get_version | |
run: | | |
$version="${{ github.event.client_payload.tag }}" | |
$cleaned_version=$version.replace('v','') | |
echo "cleaned_version=$cleaned_version" >> $env:GITHUB_OUTPUT | |
package-push-gardenlogin: | |
if: github.event.client_payload.component == 'gardenlogin' | |
runs-on: windows-latest | |
needs: package-push-common | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # [email protected] | |
- name: Update package source files | |
run: .github\workflows\update-gardenlogin.ps1 ${{ github.event.client_payload.tag }} ${{ github.event.client_payload.windows_sha }} | |
- name: Choco pack | |
uses: crazy-max/ghaction-chocolatey@0e015857dd851f84fcb7fb53380eb5c4c8202333 # [email protected] | |
with: | |
args: pack gardenlogin\gardenlogin.nuspec --version=${{ needs.package-push-common.outputs.cleaned_version }} -y --outdir gardenlogin | |
- name: Choco push | |
if: ${{ vars.SKIP_CHOCO_PUSH_GARDENLOGIN != 'true' }} | |
uses: crazy-max/ghaction-chocolatey@0e015857dd851f84fcb7fb53380eb5c4c8202333 # [email protected] | |
with: | |
args: push "gardenlogin\gardenlogin.${{ needs.package-push-common.outputs.cleaned_version }}.nupkg" --source https://chocolatey.org -k ${{ secrets.CHOCOLATEY_API_KEY }} | |
- name: Choco push - print skip info | |
if: ${{ vars.SKIP_CHOCO_PUSH_GARDENLOGIN == 'true' }} | |
run: echo "Choco push step was skipped for package-push-gardenlogin." | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # [email protected] | |
with: | |
add-paths: gardenlogin\gardenlogin.${{ needs.package-push-common.outputs.cleaned_version }}.nupkg,gardenlogin\tools\chocolateyinstall.ps1,gardenlogin\tools\chocolateyuninstall.ps1 | |
branch: update_${{ github.event.client_payload.component }}_${{ github.event.client_payload.tag }} | |
delete-branch: true | |
title: update ${{ github.event.client_payload.component }} to ${{ github.event.client_payload.tag }} | |
body: This PR adds Chocolatey package for version ${{ github.event.client_payload.tag }} and updates package sources | |
package-push-gardenctl-v2: | |
if: github.event.client_payload.component == 'gardenctl-v2' | |
runs-on: windows-latest | |
needs: package-push-common | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # [email protected] | |
- name: Update package source files | |
run: .github\workflows\update-gardenctl-v2.ps1 ${{ github.event.client_payload.tag }} ${{ github.event.client_payload.windows_sha }} | |
- name: Choco pack | |
uses: crazy-max/ghaction-chocolatey@0e015857dd851f84fcb7fb53380eb5c4c8202333 # [email protected] | |
with: | |
args: pack gardenctl-v2\gardenctl-v2.nuspec --version=${{ needs.package-push-common.outputs.cleaned_version }} -y --outdir gardenctl-v2 | |
- name: Choco push | |
if: ${{ vars.SKIP_CHOCO_PUSH_GARDENCTL_V2 != 'true' }} | |
uses: crazy-max/ghaction-chocolatey@0e015857dd851f84fcb7fb53380eb5c4c8202333 # [email protected] | |
with: | |
args: push "gardenctl-v2\gardenctl-v2.${{ needs.package-push-common.outputs.cleaned_version }}.nupkg" --source https://chocolatey.org -k ${{ secrets.CHOCOLATEY_API_KEY }} | |
- name: Choco push - print skip info | |
if: ${{ vars.SKIP_CHOCO_PUSH_GARDENCTL_V2 == 'true' }} | |
run: echo "Choco push step was skipped for package-push-gardenctl-v2." | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # [email protected] | |
with: | |
add-paths: gardenctl-v2\gardenctl-v2.${{ needs.package-push-common.outputs.cleaned_version }}.nupkg,gardenctl-v2\tools\chocolateyinstall.ps1 | |
branch: update_${{ github.event.client_payload.component }}_${{ github.event.client_payload.tag }} | |
delete-branch: true | |
title: update ${{ github.event.client_payload.component }} to ${{ github.event.client_payload.tag }} | |
body: This PR adds Chocolatey package for version ${{ github.event.client_payload.tag }} and updates package sources |