Skip to content

Bump the nuget-dependencies group with 1 update #299

Bump the nuget-dependencies group with 1 update

Bump the nuget-dependencies group with 1 update #299

Workflow file for this run

name: CI tests
on:
push:
branches: [ "main" ]
paths-ignore:
- "**/*.md"
- "**/*.txt"
- "**/*.log"
- "**/*.json"
- "**/*.xml"
- "**/*.png"
- ".ai/**"
pull_request:
branches: [ "main" ]
paths-ignore:
- "**/*.md"
- "**/*.txt"
- "**/*.log"
- "**/*.json"
- "**/*.xml"
- "**/*.png"
- ".ai/**"
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Get USERPROFILE and set CACHE_PATH
id: set_cache_path
shell: pwsh
run: |
$userProfile = [System.Environment]::GetEnvironmentVariable("USERPROFILE")
$cachePath = Join-Path $userProfile ".nuget\packages"
echo "CACHE_PATH=$cachePath" >> $env:GITHUB_ENV
- name: Cache NuGet packages
uses: actions/cache@v5
with:
path: |
~/.nuget/packages
${{ env.CACHE_PATH }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.sln') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet packages
run: dotnet restore simple-.net-Crypting-For-PowerBuilder.slnx
- name: Run Tests for solution
run: dotnet test simple-.net-Crypting-For-PowerBuilder.slnx --configuration Debug
trigger-auto-merge:
runs-on: ubuntu-latest
needs: build
# Only run on pull requests when build succeeds
if: github.event_name == 'pull_request' && needs.build.result == 'success'
permissions:
actions: write
contents: write
steps:
- name: Trigger auto-merge workflow
uses: actions/github-script@v9
with:
script: |
const prNumber = context.payload.pull_request.number;
try {
await github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'auto-merge-pr',
client_payload: {
pr_number: prNumber,
triggered_by: 'ci-workflow',
triggered_at: new Date().toISOString()
}
});
console.log(`Triggered auto-merge workflow for PR #${prNumber}`);
} catch (error) {
console.error('Failed to trigger auto-merge workflow:', error.message);
core.setFailed(`Failed to trigger auto-merge workflow: ${error.message}`);
}