Skip to content

Commit

Permalink
chore: fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Apr 19, 2024
1 parent 1847cea commit a435157
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/update_licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ concurrency:
jobs:
# Update licenses for all selected OS
# The matrix strategy trick is inspired from https://github.com/orgs/community/discussions/26253
# Basically, GitHub does not allow to have conditional statements when building matrices. One way
# to do it is to add new boolean fields and exclude the os name by combining them together. Then,
# include the actual os using the 'include' section, which is always processed after 'exclude'
# based on GitHub's documentation :
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#excluding-matrix-configurations
update_licenses:
strategy:
matrix:
config:
- os_name: linux
os: ubuntu-latest
- os_name: mac_silicon
os: macos-latest-xlarge
- os_name: mac_intel
os: macos-latest-large
os_name: [linux, mac_silicon, mac_intel]
triggerLinux:
- ${{ inputs.linux }}
triggerMacSilicon:
Expand All @@ -49,10 +48,17 @@ jobs:
os_name: mac_silicon
- triggerMacIntel: false
os_name: mac_intel
include:
- os_name: linux
os: ubuntu-latest
- os_name: mac_silicon
os: macos-latest-xlarge
- os_name: mac_intel
os: macos-latest-large

fail-fast: false

runs-on: ${{ matrix.config.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -97,10 +103,10 @@ jobs:
- uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: licenses_${{ matrix.config.os_name }}
name: licenses_${{ matrix.os_name }}
path: |
deps_licenses/licenses_${{ matrix.config.os_name }}_user.txt
deps_licenses/licenses_${{ matrix.config.os_name }}_user.txt.md5
deps_licenses/licenses_${{ matrix.os_name }}_user.txt
deps_licenses/licenses_${{ matrix.os_name }}_user.txt.md5
# Push the updates license files, as a PR or directly to the branch
push_licenses:
Expand Down

0 comments on commit a435157

Please sign in to comment.