Skip to content

Merge pull request #8 from mvanlaar/patch-1 #11

Merge pull request #8 from mvanlaar/patch-1

Merge pull request #8 from mvanlaar/patch-1 #11

Workflow file for this run

name: Add icons
# Environment variables
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Controls when the action will run.
on:
push:
branches:
- main
paths:
- "StoreApps.txt"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
validate:
name: 'Download app icons from the Store'
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Test paths
shell: pwsh
working-directory: "${{ github.workspace }}"
run: |
Test-Path -Path "$Env:GITHUB_WORKSPACE\StoreApps.txt"
Test-Path -Path "$Env:GITHUB_WORKSPACE\icons"
- name: Download Store icons
shell: pwsh
working-directory: "${{ github.workspace }}"
run: |
$params = @{
InputFile = "$Env:GITHUB_WORKSPACE\StoreApps.txt"
OutputPath = "$Env:GITHUB_WORKSPACE\icons"
Verbose = $true
}
& .\Save-MicrosoftStoreIconImage.ps1 @params
- name: Compress images
shell: pwsh
working-directory: "${{ github.workspace }}"
run: |
. .\bin\Optimise-Images.ps1 -Path "${{ github.workspace }}"
- name: Commit changes
id: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Add Store icons: ${{ github.run_number }}"
commit_user_name: ${{ secrets.COMMIT_NAME }}
commit_user_email: ${{ secrets.COMMIT_EMAIL }}