From 9559e80c6ec2b9bdf7097f748a146bd8e01ac2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Mon, 7 Feb 2022 04:25:49 +0100 Subject: [PATCH] Update installer file and wsl id for Ubuntu 20.04 (#17) --- .github/workflows/template/test.yml | 149 ++++---- .github/workflows/test.yml | 331 +++++++++++------- .../github/action/setup_wsl/Distribution.kt | 5 +- 3 files changed, 277 insertions(+), 208 deletions(-) diff --git a/.github/workflows/template/test.yml b/.github/workflows/template/test.yml index fd31ee4a..31f4899b 100644 --- a/.github/workflows/template/test.yml +++ b/.github/workflows/template/test.yml @@ -68,7 +68,7 @@ jobs: - <<: *execute_action with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} continue-on-error: true - name: Test - action should fail if an invalid distribution is given @@ -198,7 +198,7 @@ jobs: [[ "$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)" == - *${{ matrix.distribution.id }}\ \(Default\)* + *${{ matrix.distribution.wsl-id }}\ \(Default\)* ]] - &test_wsl-bash_should_use_the_correct_distribution @@ -320,12 +320,13 @@ jobs: environment: *environments distribution: - &debian - id: Debian + wsl-id: Debian + user-id: Debian match-pattern: '*Debian*' default-absent-tool: dos2unix test: - name: Test "${{ matrix.distribution.id }}" distribution on ${{ matrix.environment }} + name: Test "${{ matrix.distribution.user-id }}" distribution on ${{ matrix.environment }} needs: build runs-on: ${{ matrix.environment }} steps: @@ -335,25 +336,25 @@ jobs: - <<: *execute_action id: execute_action1 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} use-cache: false - <<: *test_wsl-bash_should_be_available_as_custom_shell name: Test - wsl-bash should fail if bash is not present by default (provocation) id: no_default_bash_provocation - if: matrix.distribution.id == 'Alpine' + if: matrix.distribution.user-id == 'Alpine' continue-on-error: true - name: Test - wsl-bash should fail if bash is not present by default (verification) if: always() - && (matrix.distribution.id == 'Alpine') + && (matrix.distribution.user-id == 'Alpine') && (steps.execute_action1.outcome == 'success') run: | wsl sh -euc "[ '${{ steps.no_default_bash_provocation.outcome }}' = 'failure' ]" - name: Delete wsl-bash if: always() - && (matrix.distribution.id == 'Alpine') + && (matrix.distribution.user-id == 'Alpine') && (steps.execute_action1.outcome == 'success') shell: cmd run: DEL /F "${{ steps.execute_action1.outputs.wsl-shell-wrapper-path }}" @@ -361,11 +362,11 @@ jobs: - <<: *execute_action name: Install Bash on Alpine if: always() - && (matrix.distribution.id == 'Alpine') + && (matrix.distribution.user-id == 'Alpine') && (steps.execute_action1.outcome == 'success') id: execute_action2 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} additional-packages: bash - <<: *test_wsl-bash_should_be_available_as_custom_shell @@ -463,7 +464,7 @@ jobs: name: Add wsl-sh wrapper id: execute_action3 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} wsl-shell-command: sh -eu - name: Test - wsl-sh should be present @@ -515,7 +516,7 @@ jobs: name: Re-add wsl-bash wrapper id: execute_action4 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} - name: Test - wsl-bash should be present if: always() @@ -549,7 +550,7 @@ jobs: name: Set wsl-bash wrapper to use user test by default id: execute_action5 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} additional-packages: sudo wsl-shell-command: bash -c "sudo -u test bash --noprofile --norc -euo pipefail "\ @@ -565,7 +566,7 @@ jobs: name: Set wsl-bash wrapper to use user test by default with inline script usage id: execute_action6 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} wsl-shell-command: bash -c "sudo -u test bash --noprofile --norc -euo pipefail '{0}'" - name: Test - wsl-bash should use test as default user with inline script usage @@ -584,7 +585,7 @@ jobs: name: Set wsl-bash wrapper to use default user by default id: execute_action7 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} - name: Test - wsl-bash should use root as default user if: always() @@ -609,7 +610,7 @@ jobs: name: Set wsl-bash wrapper to use existing user test by default with extra parameter id: execute_action8 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} wsl-shell-user: test - name: Test - wsl-bash should use existing user test as default user with extra parameter @@ -635,7 +636,7 @@ jobs: name: Set wsl-bash wrapper to use non-existing user test2 by default with extra parameter id: execute_action9 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} wsl-shell-user: test2 - name: Test - wsl-bash should use auto-generated user test2 as default user @@ -666,7 +667,7 @@ jobs: name: Make a no-op execution of the action id: execute_action10 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} - name: Test - wsl-bash should still use test2 as default user if: always() @@ -683,32 +684,38 @@ jobs: distribution: &distributions - *debian - &alpine - id: Alpine + wsl-id: Alpine + user-id: Alpine match-pattern: '*Alpine*' default-absent-tool: dos2unix - &kali - id: kali-linux + wsl-id: kali-linux + user-id: kali-linux match-pattern: '*Kali*' default-absent-tool: dos2unix - &open_suse_leap_15_2 - id: openSUSE-Leap-15.2 + wsl-id: openSUSE-Leap-15.2 + user-id: openSUSE-Leap-15.2 match-pattern: '*openSUSE*Leap*15.2*' default-absent-tool: which - &ubuntu_20_04 - id: Ubuntu-20.04 + wsl-id: Ubuntu + user-id: Ubuntu-20.04 match-pattern: '*Ubuntu*20.04*' default-absent-tool: dos2unix - &ubuntu_18_04 - id: Ubuntu-18.04 + wsl-id: Ubuntu-18.04 + user-id: Ubuntu-18.04 match-pattern: '*Ubuntu*18.04*' default-absent-tool: dos2unix - &ubuntu_16_04 - id: Ubuntu-16.04 + wsl-id: Ubuntu-16.04 + user-id: Ubuntu-16.04 match-pattern: '*Ubuntu*16.04*' default-absent-tool: dos2unix test_additional_packages: - name: Test additional packages for "${{ matrix.distribution.id }}" distribution on ${{ matrix.environment }} + name: Test additional packages for "${{ matrix.distribution.user-id }}" distribution on ${{ matrix.environment }} needs: build runs-on: ${{ matrix.environment }} steps: @@ -717,7 +724,7 @@ jobs: - <<: *execute_action with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} additional-packages: > ${{ matrix.distribution.default-absent-tool }} bash @@ -741,9 +748,9 @@ jobs: test_multiple_usage_with_different_distributions: name: Test multiple usage with different distributions - ("${{ matrix.distributions.distribution1.id }}" - / "${{ matrix.distributions.distribution2.id }}" - / "${{ matrix.distributions.distribution3.id }}") + ("${{ matrix.distributions.distribution1.user-id }}" + / "${{ matrix.distributions.distribution2.user-id }}" + / "${{ matrix.distributions.distribution3.user-id }}") on ${{ matrix.environment }} needs: build runs-on: ${{ matrix.environment }} @@ -752,29 +759,29 @@ jobs: <<: *built_artifacts_cache - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution1.id }} + name: Execute action for ${{ matrix.distributions.distribution1.user-id }} id: execute_action1 with: - distribution: ${{ matrix.distributions.distribution1.id }} + distribution: ${{ matrix.distributions.distribution1.user-id }} - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution2.id }} + name: Execute action for ${{ matrix.distributions.distribution2.user-id }} id: execute_action2 with: - distribution: ${{ matrix.distributions.distribution2.id }} + distribution: ${{ matrix.distributions.distribution2.user-id }} - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution3.id }} + name: Execute action for ${{ matrix.distributions.distribution3.user-id }} id: execute_action3 with: - distribution: ${{ matrix.distributions.distribution3.id }} + distribution: ${{ matrix.distributions.distribution3.user-id }} set-as-default: 'false' - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution1.id }} again + name: Execute action for ${{ matrix.distributions.distribution1.user-id }} again id: execute_action4 with: - distribution: ${{ matrix.distributions.distribution1.id }} + distribution: ${{ matrix.distributions.distribution1.user-id }} - name: Test - the default distribution should be the last installed distribution with set-as-default true if: always() @@ -788,7 +795,7 @@ jobs: [[ "$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)" == - *${{ matrix.distributions.distribution2.id }}\ \(Default\)* + *${{ matrix.distributions.distribution2.wsl-id }}\ \(Default\)* ]] - name: Test - wsl-bash should use the last installed distribution with set-as-default true @@ -844,7 +851,7 @@ jobs: distribution3: *debian test_multiple_usage_with_same_distribution: - name: Test multiple usage with "${{ matrix.distribution.id }}" distribution on ${{ matrix.environment }} + name: Test multiple usage with "${{ matrix.distribution.user-id }}" distribution on ${{ matrix.environment }} needs: build runs-on: ${{ matrix.environment }} steps: @@ -854,23 +861,23 @@ jobs: - <<: *execute_action id: execute_action1 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} additional-packages: bash - <<: *execute_action name: Update distribution # work-around for https://bugs.kali.org/view.php?id=6672 - if: matrix.distribution.id != 'kali-linux' + if: matrix.distribution.user-id != 'kali-linux' id: execute_action2 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} update: 'true' - <<: *execute_action name: Install default absent tool id: execute_action3 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} additional-packages: ${{ matrix.distribution.default-absent-tool }} - name: Test - ${{ matrix.distribution.default-absent-tool }} should be installed @@ -880,12 +887,12 @@ jobs: run: ${{ matrix.distribution.default-absent-tool }} --version - <<: *execute_action - name: Execute action for ${{ matrix.distribution2.id }} + name: Execute action for ${{ matrix.distribution2.user-id }} id: execute_action4 with: - distribution: ${{ matrix.distribution2.id }} + distribution: ${{ matrix.distribution2.user-id }} - - name: Test - "${{ matrix.distribution2.id }}" should be the default distribution after installation + - name: Test - "${{ matrix.distribution2.user-id }}" should be the default distribution after installation if: always() && (steps.execute_action4.outcome == 'success') shell: wsl-bash {0} @@ -912,9 +919,9 @@ jobs: name: Re-execute action id: execute_action5 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} - - name: Test - "${{ matrix.distribution2.id }}" should still be the default distribution after re-running for "${{ matrix.distribution.id }}" + - name: Test - "${{ matrix.distribution2.user-id }}" should still be the default distribution after re-running for "${{ matrix.distribution.user-id }}" if: always() && (steps.execute_action5.outcome == 'success') shell: wsl-bash {0} @@ -941,10 +948,10 @@ jobs: name: Set as default id: execute_action6 with: - distribution: ${{ matrix.distribution.id }} + distribution: ${{ matrix.distribution.user-id }} set-as-default: 'true' - - name: Test - "${{ matrix.distribution.id }}" should be the default distribution after re-running with set-as-default true + - name: Test - "${{ matrix.distribution.user-id }}" should be the default distribution after re-running with set-as-default true if: always() && (steps.execute_action6.outcome == 'success') shell: wsl-bash {0} @@ -1004,54 +1011,54 @@ jobs: <<: *built_artifacts_cache - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution1.id }} + name: Execute action for ${{ matrix.distributions.distribution1.user-id }} id: execute_action1 with: - distribution: ${{ matrix.distributions.distribution1.id }} + distribution: ${{ matrix.distributions.distribution1.user-id }} - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution2.id }} + name: Execute action for ${{ matrix.distributions.distribution2.user-id }} id: execute_action2 with: - distribution: ${{ matrix.distributions.distribution2.id }} + distribution: ${{ matrix.distributions.distribution2.user-id }} additional-packages: bash - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution3.id }} + name: Execute action for ${{ matrix.distributions.distribution3.user-id }} id: execute_action3 with: - distribution: ${{ matrix.distributions.distribution3.id }} + distribution: ${{ matrix.distributions.distribution3.user-id }} set-as-default: 'false' - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution4.id }} + name: Execute action for ${{ matrix.distributions.distribution4.user-id }} id: execute_action4 with: - distribution: ${{ matrix.distributions.distribution4.id }} + distribution: ${{ matrix.distributions.distribution4.user-id }} set-as-default: 'false' - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution5.id }} + name: Execute action for ${{ matrix.distributions.distribution5.user-id }} id: execute_action5 with: - distribution: ${{ matrix.distributions.distribution5.id }} + distribution: ${{ matrix.distributions.distribution5.user-id }} set-as-default: 'false' - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution6.id }} + name: Execute action for ${{ matrix.distributions.distribution6.user-id }} id: execute_action6 with: - distribution: ${{ matrix.distributions.distribution6.id }} + distribution: ${{ matrix.distributions.distribution6.user-id }} set-as-default: 'false' - <<: *execute_action - name: Execute action for ${{ matrix.distributions.distribution7.id }} + name: Execute action for ${{ matrix.distributions.distribution7.user-id }} id: execute_action7 with: - distribution: ${{ matrix.distributions.distribution7.id }} + distribution: ${{ matrix.distributions.distribution7.user-id }} set-as-default: 'false' - - name: Test - wsl-bash_${{ matrix.distributions.distribution1.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution1.user-id }} should use the correct distribution if: always() && (steps.execute_action1.outcome == 'success') shell: wsl-bash_Debian {0} @@ -1074,7 +1081,7 @@ jobs: ${{ matrix.distributions.distribution1.match-pattern }} ]] - - name: Test - wsl-bash_${{ matrix.distributions.distribution2.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution2.user-id }} should use the correct distribution if: always() && (steps.execute_action2.outcome == 'success') shell: wsl-bash_Alpine {0} @@ -1097,7 +1104,7 @@ jobs: ${{ matrix.distributions.distribution2.match-pattern }} ]] - - name: Test - wsl-bash_${{ matrix.distributions.distribution3.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution3.user-id }} should use the correct distribution if: always() && (steps.execute_action3.outcome == 'success') shell: wsl-bash_kali-linux {0} @@ -1120,7 +1127,7 @@ jobs: ${{ matrix.distributions.distribution3.match-pattern }} ]] - - name: Test - wsl-bash_${{ matrix.distributions.distribution4.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution4.user-id }} should use the correct distribution if: always() && (steps.execute_action4.outcome == 'success') shell: wsl-bash_openSUSE-Leap-15.2 {0} @@ -1143,7 +1150,7 @@ jobs: ${{ matrix.distributions.distribution4.match-pattern }} ]] - - name: Test - wsl-bash_${{ matrix.distributions.distribution5.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution5.user-id }} should use the correct distribution if: always() && (steps.execute_action5.outcome == 'success') shell: wsl-bash_Ubuntu-20.04 {0} @@ -1166,7 +1173,7 @@ jobs: ${{ matrix.distributions.distribution5.match-pattern }} ]] - - name: Test - wsl-bash_${{ matrix.distributions.distribution6.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution6.user-id }} should use the correct distribution if: always() && (steps.execute_action6.outcome == 'success') shell: wsl-bash_Ubuntu-18.04 {0} @@ -1189,7 +1196,7 @@ jobs: ${{ matrix.distributions.distribution6.match-pattern }} ]] - - name: Test - wsl-bash_${{ matrix.distributions.distribution7.id }} should use the correct distribution + - name: Test - wsl-bash_${{ matrix.distributions.distribution7.user-id }} should use the correct distribution if: always() && (steps.execute_action7.outcome == 'success') shell: wsl-bash_Ubuntu-16.04 {0} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 917eec9f..7a28b889 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,7 +54,7 @@ jobs: name: "Execute action" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" continue-on-error: true - name: "Test - action should fail if an invalid distribution is given" run: "if '${{ steps.execute_action.outcome }}' NEQ 'failure' exit 1\n" @@ -136,8 +136,8 @@ jobs: - if: "always() && (steps.execute_action.outcome == 'success')" name: "Test - the default distribution should be correct" run: "wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8\n[[ \"$(wslconfig.exe\ - \ /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distribution.id }}\\\ - \ \\(Default\\)* ]]\n" + \ /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distribution.wsl-id\ + \ }}\\ \\(Default\\)* ]]\n" shell: "wsl-bash {0}" - if: "always() && (steps.execute_action.outcome == 'success')" name: "Test - wsl-bash should use the correct distribution" @@ -218,12 +218,13 @@ jobs: - "windows-2022" - "windows-latest" "distribution": - - "id": "Debian" + - "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" fail-fast: false "test": - name: "Test \"${{ matrix.distribution.id }}\" distribution on ${{ matrix.environment\ + name: "Test \"${{ matrix.distribution.user-id }}\" distribution on ${{ matrix.environment\ \ }}" needs: "build" runs-on: "${{ matrix.environment }}" @@ -237,31 +238,31 @@ jobs: name: "Execute action" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "use-cache": "false" - id: "no_default_bash_provocation" - if: "matrix.distribution.id == 'Alpine'" + if: "matrix.distribution.user-id == 'Alpine'" name: "Test - wsl-bash should fail if bash is not present by default (provocation)" run: ":\n" shell: "wsl-bash {0}" continue-on-error: true - - if: "always() && (matrix.distribution.id == 'Alpine') && (steps.execute_action1.outcome\ + - if: "always() && (matrix.distribution.user-id == 'Alpine') && (steps.execute_action1.outcome\ \ == 'success')" name: "Test - wsl-bash should fail if bash is not present by default (verification)" run: "wsl sh -euc \"[ '${{ steps.no_default_bash_provocation.outcome }}' = 'failure'\ \ ]\"\n" - - if: "always() && (matrix.distribution.id == 'Alpine') && (steps.execute_action1.outcome\ + - if: "always() && (matrix.distribution.user-id == 'Alpine') && (steps.execute_action1.outcome\ \ == 'success')" name: "Delete wsl-bash" run: "DEL /F \"${{ steps.execute_action1.outputs.wsl-shell-wrapper-path }}\"" shell: "cmd" - id: "execute_action2" - if: "always() && (matrix.distribution.id == 'Alpine') && (steps.execute_action1.outcome\ + if: "always() && (matrix.distribution.user-id == 'Alpine') && (steps.execute_action1.outcome\ \ == 'success')" name: "Install Bash on Alpine" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "additional-packages": "bash" - if: "always() && (steps.execute_action1.outcome == 'success')" name: "Test - wsl-bash should be available as custom shell" @@ -311,8 +312,8 @@ jobs: - if: "always() && (steps.execute_action1.outcome == 'success')" name: "Test - the default distribution should be correct" run: "wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8\n[[ \"$(wslconfig.exe\ - \ /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distribution.id }}\\\ - \ \\(Default\\)* ]]\n" + \ /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distribution.wsl-id\ + \ }}\\ \\(Default\\)* ]]\n" shell: "wsl-bash {0}" - if: "always() && (steps.execute_action1.outcome == 'success')" name: "Test - wsl-bash should use the correct distribution" @@ -367,7 +368,7 @@ jobs: name: "Add wsl-sh wrapper" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "wsl-shell-command": "sh -eu" - if: "always() && (steps.execute_action3.outcome == 'success')" name: "Test - wsl-sh should be present" @@ -403,7 +404,7 @@ jobs: name: "Re-add wsl-bash wrapper" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" - if: "always() && (steps.execute_action4.outcome == 'success')" name: "Test - wsl-bash should be present" run: ":\n" @@ -425,7 +426,7 @@ jobs: name: "Set wsl-bash wrapper to use user test by default" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "additional-packages": "sudo" "wsl-shell-command": "bash -c \"sudo -u test bash --noprofile --norc -euo\ \ pipefail \"\\" @@ -437,7 +438,7 @@ jobs: name: "Set wsl-bash wrapper to use user test by default with inline script usage" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "wsl-shell-command": "bash -c \"sudo -u test bash --noprofile --norc -euo\ \ pipefail '{0}'\"" - if: "always() && (steps.execute_action6.outcome == 'success')" @@ -451,7 +452,7 @@ jobs: name: "Set wsl-bash wrapper to use default user by default" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" - if: "always() && (steps.execute_action7.outcome == 'success')" name: "Test - wsl-bash should use root as default user" run: "whoami\n[ \"$(whoami)\" == 'root' ]\n" @@ -468,7 +469,7 @@ jobs: \ parameter" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "wsl-shell-user": "test" - if: "always() && (steps.execute_action8.outcome == 'success')" name: "Test - wsl-bash should use existing user test as default user with extra\ @@ -487,7 +488,7 @@ jobs: \ parameter" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "wsl-shell-user": "test2" - if: "always() && (steps.execute_action9.outcome == 'success')" name: "Test - wsl-bash should use auto-generated user test2 as default user" @@ -505,7 +506,7 @@ jobs: name: "Make a no-op execution of the action" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" - if: "always() && (steps.execute_action10.outcome == 'success')" name: "Test - wsl-bash should still use test2 as default user" run: "whoami\n[ \"$(whoami)\" == 'test2' ]\n" @@ -517,30 +518,37 @@ jobs: - "windows-2022" - "windows-latest" "distribution": - - "id": "Debian" + - "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" - - "id": "Alpine" + - "wsl-id": "Alpine" + "user-id": "Alpine" "match-pattern": "*Alpine*" "default-absent-tool": "dos2unix" - - "id": "kali-linux" + - "wsl-id": "kali-linux" + "user-id": "kali-linux" "match-pattern": "*Kali*" "default-absent-tool": "dos2unix" - - "id": "openSUSE-Leap-15.2" + - "wsl-id": "openSUSE-Leap-15.2" + "user-id": "openSUSE-Leap-15.2" "match-pattern": "*openSUSE*Leap*15.2*" "default-absent-tool": "which" - - "id": "Ubuntu-20.04" + - "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - - "id": "Ubuntu-18.04" + - "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" - - "id": "Ubuntu-16.04" + - "wsl-id": "Ubuntu-16.04" + "user-id": "Ubuntu-16.04" "match-pattern": "*Ubuntu*16.04*" "default-absent-tool": "dos2unix" fail-fast: false "test_additional_packages": - name: "Test additional packages for \"${{ matrix.distribution.id }}\" distribution\ + name: "Test additional packages for \"${{ matrix.distribution.user-id }}\" distribution\ \ on ${{ matrix.environment }}" needs: "build" runs-on: "${{ matrix.environment }}" @@ -554,7 +562,7 @@ jobs: name: "Execute action" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "additional-packages": "${{ matrix.distribution.default-absent-tool }} bash\n" - if: "always() && (steps.execute_action.outcome == 'success')" name: "Test - ${{ matrix.distribution.default-absent-tool }} should be installed" @@ -571,31 +579,38 @@ jobs: - "windows-2022" - "windows-latest" "distribution": - - "id": "Debian" + - "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" - - "id": "Alpine" + - "wsl-id": "Alpine" + "user-id": "Alpine" "match-pattern": "*Alpine*" "default-absent-tool": "dos2unix" - - "id": "kali-linux" + - "wsl-id": "kali-linux" + "user-id": "kali-linux" "match-pattern": "*Kali*" "default-absent-tool": "dos2unix" - - "id": "openSUSE-Leap-15.2" + - "wsl-id": "openSUSE-Leap-15.2" + "user-id": "openSUSE-Leap-15.2" "match-pattern": "*openSUSE*Leap*15.2*" "default-absent-tool": "which" - - "id": "Ubuntu-20.04" + - "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - - "id": "Ubuntu-18.04" + - "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" - - "id": "Ubuntu-16.04" + - "wsl-id": "Ubuntu-16.04" + "user-id": "Ubuntu-16.04" "match-pattern": "*Ubuntu*16.04*" "default-absent-tool": "dos2unix" fail-fast: false "test_multiple_usage_with_different_distributions": - name: "Test multiple usage with different distributions (\"${{ matrix.distributions.distribution1.id\ - \ }}\" / \"${{ matrix.distributions.distribution2.id }}\" / \"${{ matrix.distributions.distribution3.id\ + name: "Test multiple usage with different distributions (\"${{ matrix.distributions.distribution1.user-id\ + \ }}\" / \"${{ matrix.distributions.distribution2.user-id }}\" / \"${{ matrix.distributions.distribution3.user-id\ \ }}\") on ${{ matrix.environment }}" needs: "build" runs-on: "${{ matrix.environment }}" @@ -606,31 +621,32 @@ jobs: "path": "action.yml\nbuild/distributions/\n" "key": "${{ github.run_id }}" - id: "execute_action1" - name: "Execute action for ${{ matrix.distributions.distribution1.id }}" + name: "Execute action for ${{ matrix.distributions.distribution1.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution1.id }}" + "distribution": "${{ matrix.distributions.distribution1.user-id }}" - id: "execute_action2" - name: "Execute action for ${{ matrix.distributions.distribution2.id }}" + name: "Execute action for ${{ matrix.distributions.distribution2.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution2.id }}" + "distribution": "${{ matrix.distributions.distribution2.user-id }}" - id: "execute_action3" - name: "Execute action for ${{ matrix.distributions.distribution3.id }}" + name: "Execute action for ${{ matrix.distributions.distribution3.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution3.id }}" + "distribution": "${{ matrix.distributions.distribution3.user-id }}" "set-as-default": "false" - id: "execute_action4" - name: "Execute action for ${{ matrix.distributions.distribution1.id }} again" + name: "Execute action for ${{ matrix.distributions.distribution1.user-id }}\ + \ again" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution1.id }}" + "distribution": "${{ matrix.distributions.distribution1.user-id }}" - if: "always() && (steps.execute_action4.outcome == 'success')" name: "Test - the default distribution should be the last installed distribution\ \ with set-as-default true" run: "wslconfig.exe /list\nwslconfig.exe /list | iconv -f UTF-16LE -t UTF-8\n\ - [[ \"$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distributions.distribution2.id\ + [[ \"$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distributions.distribution2.wsl-id\ \ }}\\ \\(Default\\)* ]]\n" shell: "wsl-bash {0}" - if: "always() && (steps.execute_action4.outcome == 'success')" @@ -655,80 +671,98 @@ jobs: - "windows-latest" "distributions": - "distribution1": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" "distribution3": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" - "distribution1": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" "distribution3": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - "distribution1": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution3": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" - "distribution1": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" "distribution3": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" - "distribution1": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution3": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - "distribution1": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" "distribution3": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" fail-fast: false "test_multiple_usage_with_same_distribution": - name: "Test multiple usage with \"${{ matrix.distribution.id }}\" distribution\ + name: "Test multiple usage with \"${{ matrix.distribution.user-id }}\" distribution\ \ on ${{ matrix.environment }}" needs: "build" runs-on: "${{ matrix.environment }}" @@ -742,33 +776,33 @@ jobs: name: "Execute action" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "additional-packages": "bash" - id: "execute_action2" - if: "matrix.distribution.id != 'kali-linux'" + if: "matrix.distribution.user-id != 'kali-linux'" name: "Update distribution" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "update": "true" - id: "execute_action3" name: "Install default absent tool" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "additional-packages": "${{ matrix.distribution.default-absent-tool }}" - if: "always() && (steps.execute_action3.outcome == 'success')" name: "Test - ${{ matrix.distribution.default-absent-tool }} should be installed" run: "${{ matrix.distribution.default-absent-tool }} --version" shell: "wsl-bash {0}" - id: "execute_action4" - name: "Execute action for ${{ matrix.distribution2.id }}" + name: "Execute action for ${{ matrix.distribution2.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distribution2.id }}" + "distribution": "${{ matrix.distribution2.user-id }}" - if: "always() && (steps.execute_action4.outcome == 'success')" - name: "Test - \"${{ matrix.distribution2.id }}\" should be the default distribution\ - \ after installation" + name: "Test - \"${{ matrix.distribution2.user-id }}\" should be the default\ + \ distribution after installation" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -784,10 +818,10 @@ jobs: name: "Re-execute action" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" - if: "always() && (steps.execute_action5.outcome == 'success')" - name: "Test - \"${{ matrix.distribution2.id }}\" should still be the default\ - \ distribution after re-running for \"${{ matrix.distribution.id }}\"" + name: "Test - \"${{ matrix.distribution2.user-id }}\" should still be the default\ + \ distribution after re-running for \"${{ matrix.distribution.user-id }}\"" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -803,10 +837,10 @@ jobs: name: "Set as default" uses: "./" with: - "distribution": "${{ matrix.distribution.id }}" + "distribution": "${{ matrix.distribution.user-id }}" "set-as-default": "true" - if: "always() && (steps.execute_action6.outcome == 'success')" - name: "Test - \"${{ matrix.distribution.id }}\" should be the default distribution\ + name: "Test - \"${{ matrix.distribution.user-id }}\" should be the default distribution\ \ after re-running with set-as-default true" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ @@ -826,85 +860,105 @@ jobs: - "windows-2022" - "windows-latest" "distribution": - - "id": "Debian" + - "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" - - "id": "Alpine" + - "wsl-id": "Alpine" + "user-id": "Alpine" "match-pattern": "*Alpine*" "default-absent-tool": "dos2unix" - - "id": "kali-linux" + - "wsl-id": "kali-linux" + "user-id": "kali-linux" "match-pattern": "*Kali*" "default-absent-tool": "dos2unix" - - "id": "openSUSE-Leap-15.2" + - "wsl-id": "openSUSE-Leap-15.2" + "user-id": "openSUSE-Leap-15.2" "match-pattern": "*openSUSE*Leap*15.2*" "default-absent-tool": "which" - - "id": "Ubuntu-20.04" + - "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - - "id": "Ubuntu-18.04" + - "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" - - "id": "Ubuntu-16.04" + - "wsl-id": "Ubuntu-16.04" + "user-id": "Ubuntu-16.04" "match-pattern": "*Ubuntu*16.04*" "default-absent-tool": "dos2unix" "distribution2": - - "id": "Debian" + - "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "exclude": - "environment": "windows-2019" "distribution": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" - "environment": "windows-2022" "distribution": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" - "environment": "windows-latest" "distribution": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "include": - "environment": "windows-2019" "distribution": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - "environment": "windows-2022" "distribution": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" - "environment": "windows-latest" "distribution": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" fail-fast: false @@ -919,49 +973,49 @@ jobs: "path": "action.yml\nbuild/distributions/\n" "key": "${{ github.run_id }}" - id: "execute_action1" - name: "Execute action for ${{ matrix.distributions.distribution1.id }}" + name: "Execute action for ${{ matrix.distributions.distribution1.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution1.id }}" + "distribution": "${{ matrix.distributions.distribution1.user-id }}" - id: "execute_action2" - name: "Execute action for ${{ matrix.distributions.distribution2.id }}" + name: "Execute action for ${{ matrix.distributions.distribution2.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution2.id }}" + "distribution": "${{ matrix.distributions.distribution2.user-id }}" "additional-packages": "bash" - id: "execute_action3" - name: "Execute action for ${{ matrix.distributions.distribution3.id }}" + name: "Execute action for ${{ matrix.distributions.distribution3.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution3.id }}" + "distribution": "${{ matrix.distributions.distribution3.user-id }}" "set-as-default": "false" - id: "execute_action4" - name: "Execute action for ${{ matrix.distributions.distribution4.id }}" + name: "Execute action for ${{ matrix.distributions.distribution4.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution4.id }}" + "distribution": "${{ matrix.distributions.distribution4.user-id }}" "set-as-default": "false" - id: "execute_action5" - name: "Execute action for ${{ matrix.distributions.distribution5.id }}" + name: "Execute action for ${{ matrix.distributions.distribution5.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution5.id }}" + "distribution": "${{ matrix.distributions.distribution5.user-id }}" "set-as-default": "false" - id: "execute_action6" - name: "Execute action for ${{ matrix.distributions.distribution6.id }}" + name: "Execute action for ${{ matrix.distributions.distribution6.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution6.id }}" + "distribution": "${{ matrix.distributions.distribution6.user-id }}" "set-as-default": "false" - id: "execute_action7" - name: "Execute action for ${{ matrix.distributions.distribution7.id }}" + name: "Execute action for ${{ matrix.distributions.distribution7.user-id }}" uses: "./" with: - "distribution": "${{ matrix.distributions.distribution7.id }}" + "distribution": "${{ matrix.distributions.distribution7.user-id }}" "set-as-default": "false" - if: "always() && (steps.execute_action1.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution1.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution1.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -974,8 +1028,8 @@ jobs: \ matrix.distributions.distribution1.match-pattern }} ]]\n" shell: "wsl-bash_Debian {0}" - if: "always() && (steps.execute_action2.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution2.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution2.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -988,8 +1042,8 @@ jobs: \ matrix.distributions.distribution2.match-pattern }} ]]\n" shell: "wsl-bash_Alpine {0}" - if: "always() && (steps.execute_action3.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution3.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution3.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -1002,8 +1056,8 @@ jobs: \ matrix.distributions.distribution3.match-pattern }} ]]\n" shell: "wsl-bash_kali-linux {0}" - if: "always() && (steps.execute_action4.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution4.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution4.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -1016,8 +1070,8 @@ jobs: \ matrix.distributions.distribution4.match-pattern }} ]]\n" shell: "wsl-bash_openSUSE-Leap-15.2 {0}" - if: "always() && (steps.execute_action5.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution5.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution5.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -1030,8 +1084,8 @@ jobs: \ matrix.distributions.distribution5.match-pattern }} ]]\n" shell: "wsl-bash_Ubuntu-20.04 {0}" - if: "always() && (steps.execute_action6.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution6.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution6.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -1044,8 +1098,8 @@ jobs: \ matrix.distributions.distribution6.match-pattern }} ]]\n" shell: "wsl-bash_Ubuntu-18.04 {0}" - if: "always() && (steps.execute_action7.outcome == 'success')" - name: "Test - wsl-bash_${{ matrix.distributions.distribution7.id }} should use\ - \ the correct distribution" + name: "Test - wsl-bash_${{ matrix.distributions.distribution7.user-id }} should\ + \ use the correct distribution" run: "cat <(lsb_release -a || true) <(uname -a || true) <([ -d /etc ] && find\ \ /etc -maxdepth 1 -type f \\( -name '*release' -or -name 'issue*' \\) -exec\ \ cat {} + || true) <([ -d /etc/products.d ] && find /etc/products.d -maxdepth\ @@ -1065,31 +1119,38 @@ jobs: - "windows-latest" "distributions": - "distribution1": - "id": "Debian" + "wsl-id": "Debian" + "user-id": "Debian" "match-pattern": "*Debian*" "default-absent-tool": "dos2unix" "distribution2": - "id": "Alpine" + "wsl-id": "Alpine" + "user-id": "Alpine" "match-pattern": "*Alpine*" "default-absent-tool": "dos2unix" "distribution3": - "id": "kali-linux" + "wsl-id": "kali-linux" + "user-id": "kali-linux" "match-pattern": "*Kali*" "default-absent-tool": "dos2unix" "distribution4": - "id": "openSUSE-Leap-15.2" + "wsl-id": "openSUSE-Leap-15.2" + "user-id": "openSUSE-Leap-15.2" "match-pattern": "*openSUSE*Leap*15.2*" "default-absent-tool": "which" "distribution5": - "id": "Ubuntu-20.04" + "wsl-id": "Ubuntu" + "user-id": "Ubuntu-20.04" "match-pattern": "*Ubuntu*20.04*" "default-absent-tool": "dos2unix" "distribution6": - "id": "Ubuntu-18.04" + "wsl-id": "Ubuntu-18.04" + "user-id": "Ubuntu-18.04" "match-pattern": "*Ubuntu*18.04*" "default-absent-tool": "dos2unix" "distribution7": - "id": "Ubuntu-16.04" + "wsl-id": "Ubuntu-16.04" + "user-id": "Ubuntu-16.04" "match-pattern": "*Ubuntu*16.04*" "default-absent-tool": "dos2unix" fail-fast: false \ No newline at end of file diff --git a/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt b/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt index 93108cec..2e93f6c3 100644 --- a/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt +++ b/src/main/kotlin/net/kautler/github/action/setup_wsl/Distribution.kt @@ -207,11 +207,12 @@ abstract class AptGetBasedDistribution : Distribution { } object Ubuntu2004 : AptGetBasedDistribution( - wslId = "Ubuntu-20.04", + wslId = "Ubuntu", + userId = "Ubuntu-20.04", distributionName = "Ubuntu", version = SemVer("20.4.0", jsObject()), downloadUrl = URL("https://aka.ms/wslubuntu2004"), - installerFile = "ubuntu2004.exe" + installerFile = "ubuntu.exe" ) object Ubuntu1804 : AptGetBasedDistribution(