Skip to content

Switch to Powershell cmdlet and always install/upgrade to latest winget #5

Switch to Powershell cmdlet and always install/upgrade to latest winget

Switch to Powershell cmdlet and always install/upgrade to latest winget #5

Workflow file for this run

name: 'Test Action'

Check failure on line 1 in .github/workflows/test_action.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test_action.yml

Invalid workflow file

(Line: 31, Col: 13): Unrecognized named-value: 'github'. Located at position 1 within expression: github.ref, (Line: 60, Col: 13): Unrecognized named-value: 'github'. Located at position 1 within expression: github.ref
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-job:
name: Test Job (No GitHub token)
strategy:
fail-fast: false
matrix:
os: [ 'windows-2022', 'windows-2025', 'windows-11-arm', 'windows-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Install winget
id: install-winget
uses: geldata/install-winget@${{ github.ref }}
- name: Check Version
shell: bash
run: |
VERSION="${{ steps.install-winget.outputs.winget-version }}"
if [ -z "$VERSION" ]; then
exit 1
fi
echo $VERSION
- name: Install wingetcreate
run: winget install wingetcreate --disable-interactivity --accept-source-agreements --accept-package-agreements
test-job-with-token:
name: Test with GitHub Token
strategy:
fail-fast: false
matrix:
os: [ 'windows-2025', 'windows-2025', 'windows-11-arm', 'windows-latest' ]
repeat: [ 'a', 'b' ]
runs-on: ${{ matrix.os }}
steps:
- name: Echo Runner OS version
shell: powershell
run: (Get-WmiObject Win32_OperatingSystem).Caption
- name: Install winget
id: install-winget
uses: geldata/install-winget@${{ github.ref }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check Version
shell: bash
run: |
VERSION="${{ steps.install-winget.outputs.winget-version }}"
if [ -z "$VERSION" ]; then
exit 1
fi
echo $VERSION
- name: Install wingetcreate
run: winget install wingetcreate --disable-interactivity --accept-source-agreements