github: Use dawidd6/action-download-artifact with the new ref: option

This allows specifying either a commit or a branch in the same
field, allowing simplifying both the workflow inputs, and
the expressions for passing commit/branch to both
dawidd6/action-download-artifact and actions/checkout.

This new option is available since
https://github.com/dawidd6/action-download-artifact/pull/329.
This commit is contained in:
Martin Storsjö committed 2025-06-03 16:36:12 +03:00
1 parent 5110f3da62
commit 9633e7501c
5 files changed
+34 -58

No files matched your search

+6 -11
View File
@@ -2,11 +2,8 @@ name: Run LLVM tests
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit to extract from'
type: string
branch:
description: 'Branch to extract from'
ref:
description: 'Ref to extract from'
type: string
default: 'master'
pipeline_type:
@@ -28,12 +25,11 @@ jobs:
LLVM_VERSION: ${{steps.get-parameters.outputs.LLVM_VERSION}}
steps:
- name: Download build parameters
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v10
with:
workflow: build.yml
workflow_conclusion: success
commit: ${{github.event_name != 'schedule' && inputs.commit || ''}}
branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}}
ref: ${{github.event_name == 'schedule' && 'master' || inputs.ref}}
event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}}
name: parameters
- name: Get build parameters
@@ -57,12 +53,11 @@ jobs:
run: |
choco install ninja
- name: Download toolchain
uses: dawidd6/action-download-artifact@v6
uses: dawidd6/action-download-artifact@v10
with:
workflow: build.yml
workflow_conclusion: success
commit: ${{github.event_name != 'schedule' && inputs.commit || ''}}
branch: ${{github.event_name == 'schedule' && 'master' || (inputs.commit == '' && inputs.branch || '')}}
ref: ${{github.event_name == 'schedule' && 'master' || inputs.ref}}
event: ${{github.event_name == 'schedule' && 'schedule' || inputs.pipeline_type}}
name: windows-ucrt-${{matrix.arch}}-toolchain
- name: Unpack toolchain