Skip to content

Commit

Permalink
The secrets expression doesn't work within action.yml, flow through i…
Browse files Browse the repository at this point in the history
…nput instead
  • Loading branch information
IEvangelist committed Sep 7, 2023
1 parent 94b3153 commit 8bdb464
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions actions/dotnet-version-updater/action.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
name: '.NET version upgrader'
description: 'A GitHub Action that relies on the .NET version sweeper to upgrade projects to the latest .NET version.'
name: ".NET version upgrader"
description: "A GitHub Action that relies on the .NET version sweeper to upgrade projects to the latest .NET version."
branding:
icon: 'git-pull-request'
color: 'purple'
icon: "git-pull-request"
color: "purple"
inputs:
support:
description: "The support level to target (STS, LTS, or Preview)."
required: false
default: "STS"
description: "The support level to target (STS, LTS, or Preview)."
required: false
default: "STS"
token:
description: "The GitHub token to use for authentication."
required: true
runs:
using: "composite"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

# Start the .NET version sweeper, scan projects/slns for non-LTS (or STS) versions
# Start the .NET version sweeper, scan project(s)/sln(s) for non-LTS (or STS) versions
- name: .NET version sweeper
id: dotnet-version-sweeper
uses: dotnet/versionsweeper@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ inputs.token }}
with:
owner: ${{ github.repository_owner }}
name: ${{ github.repository }}
branch: ${{ github.ref }}
owner: ${{ github.repository_owner }}
name: ${{ github.repository }}
branch: ${{ github.ref }}

# Call the upgrade projects script, passing in the list of projects to upgrade
- id: upgrade-projects
if: steps.dotnet-version-sweeper.outputs.has-remaining-work == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOTNET_UPGRADEASSISTANT_TELEMETRY_OPTOUT: '1' # opt-out of upgrade-assistant telemetry
GITHUB_TOKEN: ${{ inputs.token }}
DOTNET_UPGRADEASSISTANT_TELEMETRY_OPTOUT: "1" # opt-out of upgrade-assistant telemetry
shell: pwsh
run: |
$support = '${{ inputs.support }}'
Expand Down

0 comments on commit 8bdb464

Please sign in to comment.