Skip to content

Commit c08fd0a

Browse files
authored
Merge pull request #35 from auth0/feat/SDK-7831
Update actions to use env-vars instead of input-values
2 parents 81f28dd + d7f1007 commit c08fd0a

3 files changed

Lines changed: 33 additions & 16 deletions

File tree

.github/actions/nuget-publish/action.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ runs:
2525

2626
- name: Create NuGet packages
2727
shell: pwsh
28+
env:
29+
PROJECT_PATHS: ${{ inputs.project-paths }}
30+
NUGET_DIRECTORY: ${{ inputs.nuget-directory }}
2831
run: |
29-
foreach($file in (ConvertFrom-Json -InputObject "${{ inputs.project-paths }}")) {
30-
dotnet pack $file --configuration Release --output ${{ inputs.nuget-directory }}
32+
foreach($file in (ConvertFrom-Json -InputObject "$env:PROJECT_PATHS")) {
33+
dotnet pack $file --configuration Release --output $env:NUGET_DIRECTORY
3134
}
3235
3336
- name: Publish NuGet packages
3437
shell: pwsh
38+
env:
39+
NUGET_DIRECTORY: ${{ inputs.nuget-directory }}
40+
NUGET_TOKEN: ${{ inputs.nuget-token }}
3541
run: |
36-
foreach($file in (Get-ChildItem "${{ inputs.nuget-directory }}" -Recurse -Include *.nupkg)) {
37-
dotnet nuget push $file --api-key "${{ inputs.nuget-token }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
38-
}
42+
foreach($file in (Get-ChildItem "$env:NUGET_DIRECTORY" -Recurse -Include *.nupkg)) {
43+
dotnet nuget push $file --api-key "$env:NUGET_TOKEN" --source https://api.nuget.org/v3/index.json --skip-duplicate
44+
}

.github/actions/rl-scanner/action.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,23 @@ runs:
4040
RLSECURE_SITE_KEY: ${{ env.RLSECURE_SITE_KEY }}
4141
SIGNAL_HANDLER_TOKEN: ${{ env.SIGNAL_HANDLER_TOKEN }}
4242
PYTHONUNBUFFERED: 1
43+
ARTIFACT_PATH: ${{ inputs.artifact-path }}
44+
ARTIFACT_VERSION: ${{ inputs.version }}
45+
REPO_NAME: ${{ github.event.repository.name }}
46+
REPO_FULL: ${{ github.repository }}
47+
COMMIT_SHA: ${{ github.sha }}
4348
run: |
44-
if [ ! -f "${{ inputs.artifact-path }}" ]; then
45-
echo "Artifact not found: ${{ inputs.artifact-path }}"
49+
if [ ! -f "$ARTIFACT_PATH" ]; then
50+
echo "Artifact not found: $ARTIFACT_PATH"
4651
exit 1
4752
fi
4853
4954
rl-wrapper \
50-
--artifact "${{ inputs.artifact-path }}" \
51-
--name "${{ github.event.repository.name }}" \
52-
--version "${{ inputs.version }}" \
53-
--repository "${{ github.repository }}" \
54-
--commit "${{ github.sha }}" \
55+
--artifact "$ARTIFACT_PATH" \
56+
--name "$REPO_NAME" \
57+
--version "$ARTIFACT_VERSION" \
58+
--repository "$REPO_FULL" \
59+
--commit "$COMMIT_SHA" \
5560
--build-env "github_actions" \
5661
--suppress_output
5762

.github/workflows/rl-secure.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,18 @@ jobs:
4545

4646
- name: Create NuGet packages
4747
shell: pwsh
48-
run: |
49-
dotnet pack ${{ inputs.project-path }} --configuration Release --output ${{ github.workspace }}/nuget
50-
48+
env:
49+
PROJECT_PATH: ${{ inputs.project-path }}
50+
NUGET_OUTPUT: ${{ github.workspace }}/nuget
51+
run: |
52+
dotnet pack $env:PROJECT_PATH --configuration Release --output $env:NUGET_OUTPUT
53+
5154
- name: Create tgz build artifact
55+
env:
56+
ARTIFACT_NAME: ${{ inputs.artifact-name }}
57+
WORKSPACE: ${{ github.workspace }}
5258
run: |
53-
tar -czvf ${{ github.workspace }}/${{ inputs.artifact-name }} ${{ github.workspace }}/nuget
59+
tar -czvf "$WORKSPACE/$ARTIFACT_NAME" "$WORKSPACE/nuget"
5460
5561
- id: get_version
5662
uses: ./.github/actions/get-version

0 commit comments

Comments
 (0)