diff --git a/.github/actions/install-pdk.yml b/.github/actions/install-pdk.yml new file mode 100644 index 00000000..e372b4c2 --- /dev/null +++ b/.github/actions/install-pdk.yml @@ -0,0 +1,21 @@ +# .github/actions/install-pdk/action.yml +name: 'Install PDK' +description: 'Installs winget and PDK' +inputs: + GITHUB_TOKEN: + description: 'GitHub token' + required: true + pdk_version: + description: 'PDK version to install' + required: true +runs: + using: 'composite' + steps: + - name: Install winget + uses: Cyberboss/install-winget@v1 + with: + GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} + - name: Install PDK + run: | + winget install pdk --version=${{ inputs.pdk_version }} --silent --accept-source-agreements + shell: powershell \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45320a39..69ff3849 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,14 +109,11 @@ jobs: shell: powershell modules-to-cache: ${{ env.module_cache }} - - name: Install winget - uses: Cyberboss/install-winget@v1 + - name: Use my custom action + uses: ./.github/actions/install-pdk with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "install pdk" - run: | - winget install pdk --version=${{ env.pdk_version }} --silent --accept-source-agreements + pdk_version: '1.18.1' - name: "configure winrm" run: |