Skip to content

Commit

Permalink
refactor chocolatey env passing
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfz0r committed Dec 11, 2023
1 parent 6ac9f3c commit 549de5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 1 addition & 8 deletions .github/shared/docker-chocolatey/action.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@

name: 'Docker chocolatey action'
description: 'Runs commands in a slightly modified chocolatey container'

inputs:
command:
description: 'The command to exec'
required: true
jsonEnv:
description: 'Environment to pass to docker run as json string'
required: false
default: "{}"

runs:
using: 'docker'
image: 'Dockerfile'
env: ${{ fromJSON(inputs.jsonEnv) }}
args:
- ${{ inputs.command }}

- ${{ inputs.command }}
3 changes: 2 additions & 1 deletion .github/workflows/pr-and-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ jobs:
uses: ./.github/shared/docker-chocolatey
with:
command: make push-chocolatey
jsonEnv: '{ "CHOCO_API_KEY": "${{ secrets.CHOCO_API_KEY }}" }'
env:
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}

- name: "Upload sidecar artifacts to S3"
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 549de5d

Please sign in to comment.