Skip to content

Bump the swashbuckle group in /src/backend with 3 updates #818

Bump the swashbuckle group in /src/backend with 3 updates

Bump the swashbuckle group in /src/backend with 3 updates #818

name: "Automatically update dotnet lockfiles in dependabot PRs"
on:
workflow_dispatch:
pull_request_target:
env:
SOLUTION_PATH: "src/backend"
SOLUTION_NAME: "Backend.sln"
jobs:
update-lockfiles:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Checkout ${{ github.head_ref }}
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.WORKFLOW_TOKEN }}
- name: Setup git user
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Update lockfiles
working-directory: ${{ env.SOLUTION_PATH }}
run: |
dotnet restore ${{ env.SOLUTION_NAME }}
git status
if output=$(git status --porcelain) && [ -z "$output" ]; then
# Working directory clean - do nothing
echo Working directory clean
exit 0
else
# Uncommitted changes
echo Add and commit changes
git commit -a -m "Update lockfiles"
git push
fi