Skip to content

Merge pull request #62 from 417-72KI/renovate/apple-swift-argument-pa… #26

Merge pull request #62 from 417-72KI/renovate/apple-swift-argument-pa…

Merge pull request #62 from 417-72KI/renovate/apple-swift-argument-pa… #26

Workflow file for this run

name: Package
on:
push:
branches: main
paths:
- Package.swift
- Package.resolved
- .github/workflows/package.yml
jobs:
resolve-package:
name: Resolve package
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-swift-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-swift
${{ runner.os }}-
- name: Resolve dependencies
id: resolve
run: |
swift package resolve
echo "count=$(git diff --name-only | grep -E '^Package.resolved$' | wc -l)" >> $GITHUB_OUTPUT
- name: Commit Package.resolved
if: steps.resolve.outputs.count > 0
run: |
git config user.name github-actions
git config user.email [email protected]
git commit -m "Update Package.resolved" Package.resolved
git push -f
- name: Create Pull Request if failed
if: ${{ steps.resolve.outputs.count > 0 && failure() }}
env:
GH_TOKEN: ${{ github.token }}
run: |
git checkout -b 'auto/update-package-resolved'
git push -fu origin 'auto/update-package-resolved'
gh pr create -t 'Update Package.resolved' -b ''