Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/upgrade-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ jobs:
matrix:
repo: ${{ fromJson(needs.define-matrix.outputs.repos) }}
steps:
- uses: actions/checkout@v5
- name: Clone repository
run: git clone https://github.com/nspcc-dev/${{matrix.repo}}.git
- name: Clone repo
uses: actions/checkout@v5
with:
repository: https://github.com/nspcc-dev/${{matrix.repo}}.git
token: ${{ GH_TOKEN }}

- name: Checkout upgrade-actions branch
run: git checkout -b upgrade-actions || git checkout upgrade-actions

- name: Upgrade, commit and push changes
run: |
cd ${{matrix.repo}}
for action in "actions/checkout" "actions/setup-go" "golangci/golangci-lint-action" "codecov/codecov-action"; do
latestVersion="$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2026-03-10" /repos/${action}/releases/latest | jq .tag_name -r)"
latestVersion="${latestVersion%%.*}"
Expand All @@ -43,7 +48,6 @@ jobs:
if [[ $(git diff) ]]; then
echo "Committing git diff..."
git diff
git checkout -b upgrade-actions
git config user.name "Sami"
git config user.email "sami@nspcc.ru"
git add .github
Expand All @@ -52,8 +56,7 @@ jobs:
git push --set-upstream origin upgrade-actions
gh pr create --base master --head upgrade-actions --title ".github: upgrade Actions" --body "Upgrade GitHub Actions to the latest version."
else
echo "Everything is up to date."
echo "Everything is up to date, nothing to commit."
fi
cd ../
env:
GH_TOKEN: ${{ secrets.SAMI_GHACTION_UPGRADE_TOKEN }}
Loading