Dotnet sdk version auto upgrade #440
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: Dotnet sdk version auto upgrade | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '45 0 * * 1,4' # mon/Thursday | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: 'Update .NET Versions' | |
id: dotnet_sdk_version_update | |
working-directory: ./starsky-tools/build-tools | |
run: npm run dotnet-sdk-version-update | |
- name: Npm generate package list ${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }} | |
working-directory: ./starsky-tools/build-tools | |
run: npm run nuget-package-list | |
- shell: bash | |
working-directory: ./starsky | |
id: files_changed | |
run: | | |
git status | |
git status --porcelain | |
if [[ `git status --porcelain` ]]; then | |
echo "There are files not committed yet" | |
echo "CHANGED=true" >> $GITHUB_OUTPUT | |
else | |
echo "not changed" | |
echo "CHANGED=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create Pull Request ${{ steps.files_changed.outputs.CHANGED }} | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.WORKFLOW_GITHUB }} | |
commit-message: 'Auto .NET SDK version Upgrade to ${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }}' | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
add-paths: | | |
* | |
branch: feature/auto_dotnet_sdk_version_upgrade_${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }} | |
delete-branch: true | |
title: '.NET SDK Upgrade to ${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }}' | |
body: | | |
## Upgrade of .NET with newer SDK Version | |
- Install SDK version ${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }} on your development machine ${{ steps.dotnet_sdk_version_update.outputs.SDK_RELEASE_NOTES }} | |
- First test on linux-arm test envs before approve | |
- update azure runtime on test https://demostarsky.scm.azurewebsites.net/ | |
- update docs with minimal version https://github.com/qdraw/starsky/blob/feature/auto_dotnet_sdk_version_upgrade_${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }}/starsky/readme.md | |
- update changelog https://github.com/qdraw/starsky/blob/feature/auto_dotnet_sdk_version_upgrade_${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }}/history.md | |
## When upgrading a major version | |
- when upgrading to newer major release check docker | |
labels: | | |
dependencies | |
draft: false | |
- name: Merge current branch into -> auto_dotnet_sdk_version_upgrade | |
uses: everlytic/[email protected] | |
if: github.event_name == 'workflow_dispatch' && steps.files_changed.outputs.CHANGED == 'true' | |
with: | |
github_token: ${{ secrets.WORKFLOW_GITHUB }} | |
source_ref: 'master' | |
target_branch: feature/auto_dotnet_sdk_version_upgrade_${{ steps.dotnet_sdk_version_update.outputs.SDK_VERSION }} | |
commit_message_template: '[Automated] Merged {source_ref} into target {target_branch}' |