Using ${{env.config}} in dotnet pack - good catch, updated it.
Setting env.dotnet_core_version to 6.0.x is better as you have outlined. Note that it is still an environment variable and the value can be changed as you see it fit, it is just an example.
With regards to env.DOTNET_CLI_TELEMETRY_OPTOUT and env.DOTNET_SKIP_FIRST_TIME_EXPERIENCE, GH action will run fine but the first run of any dotnet command will eat up some time sending telemetry data to Microsoft so it is always better to set these flags to disable it.
Hi I found some issues in your sample
configurationflag withenvyou set likedotnet pack src/proj/proj.csproj -o ./artifacts --configuration ${{env.config}}env.dotnet_core_versionto 6.0.x to download latest security updates of .NET 6env.DOTNET_CLI_TELEMETRY_OPTOUTandenv.DOTNET_SKIP_FIRST_TIME_EXPERIENCEare not necessary and you can remove them. this is my test