Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some CI hardening #451

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/PKGBUILD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
Expand All @@ -55,8 +56,10 @@ jobs:
pacboy: toolchain:p

- name: '🚧 Build package'
env:
PKGBUILD_PATH: ${{ inputs.path }}
run: |
cd ${{ inputs.path }}
cd "$PKGBUILD_PATH"
makepkg-mingw --noconfirm --noprogressbar -sCLf

- name: '📤 Upload artifact: package'
Expand All @@ -66,10 +69,12 @@ jobs:
path: ${{ inputs.path }}/*.zst

- name: '🔍 Show package content'
env:
PKGBUILD_PATH: ${{ inputs.path }}
run: |
mkdir tmp
cd tmp
tar -xf ../${{ inputs.path }}/*.zst
tar -xf ../"$PKGBUILD_PATH"/*.zst
tree .


Expand Down Expand Up @@ -102,4 +107,4 @@ jobs:
run: pacman -U --noconfirm --noprogressbar *.zst

- name: '🚦 Test package'
run: ${{ inputs.test }}
run: ${{ inputs.test }} # zizmor: ignore[template-injection]
52 changes: 49 additions & 3 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- run: |
npm ci
npm run lint
Expand All @@ -24,6 +26,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 🚧 build action
shell: bash
run: |
Expand Down Expand Up @@ -52,6 +56,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -90,6 +96,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -134,6 +142,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -172,6 +182,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -190,6 +202,8 @@ jobs:
- uses: actions/setup-go@v5
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -208,6 +222,8 @@ jobs:
- uses: actions/setup-go@v5
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -230,6 +246,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -256,6 +274,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -279,6 +298,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -297,6 +317,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -315,6 +337,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -335,6 +359,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -356,6 +382,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -384,6 +412,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -408,6 +438,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -422,14 +454,18 @@ jobs:
run: |
cygpath -m /
- shell: pwsh
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
run: |
echo '${{ steps.msys2.outputs.msys2-location }}'
echo "$env:MSYS2_LOCATION"
- shell: pwsh
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
run: |
$Env:MSYS2_ROOT = msys2 -c 'cygpath -a -w /'
$Env:MSYS2_ROOT
if ($env:MSYS2_ROOT -ne '${{ steps.msys2.outputs.msys2-location }}') {
Write-Error "Error: MSYS2_ROOT is '$env:MSYS2_ROOT', expected '${{ steps.msys2.outputs.msys2-location }}'"
if ($env:MSYS2_ROOT -ne "$env:MSYS2_LOCATION") {
Write-Error "Error: MSYS2_ROOT is '$env:MSYS2_ROOT', expected '$env:MSYS2_LOCATION'"
exit 1
}
- shell: python
Expand All @@ -449,6 +485,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- id: all
uses: ./matrix
- id: min
Expand All @@ -468,6 +506,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -490,6 +530,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -513,6 +555,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -540,6 +584,8 @@ jobs:
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 📥 Download artifact
uses: actions/download-artifact@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ The absolute path of the MSYS2 installation location. Example: `D:\a\_temp\msys6
```yaml
- uses: msys2/setup-msys2@v2
id: msys2
- run: echo '${{ steps.msys2.outputs.msys2-location }}'
- env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
run: echo "$env:MSYS2_LOCATION"
```

Available since v2.24.1
Expand Down
1 change: 1 addition & 0 deletions examples/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
Expand Down
Loading