Fail release workflow if not in tags
stable / cross-${{ matrix.target }} (aarch64-unknown-linux-gnu) Details
stable / fmt Details
stable / cross-${{ matrix.target }} (armv7-unknown-linux-gnueabihf) Details
stable / cross-${{ matrix.target }} (x86_64-unknown-linux-gnu) Details

This commit is contained in:
chmanie 2023-06-12 21:36:20 +02:00
parent 18671683ff
commit 2ca1978b17
2 changed files with 8 additions and 1 deletions

6
.gitea/scripts/check-tag Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
if [ "$(echo $GITHUB_REF| cut -d'/' -f2)" == "tags" ]; then
echo "$(echo $GITHUB_REF| cut -d'/' -f2)"
exit 1;
fi

View File

@ -10,11 +10,12 @@ jobs:
runs-on: rust-cross runs-on: rust-cross
name: stable / cross-${{ matrix.target }} name: stable / cross-${{ matrix.target }}
strategy: strategy:
fail-fast: false fail-fast: true
matrix: matrix:
target: ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"] target: ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: .gitea/scripts/check-tag
- run: cargo fmt --check - run: cargo fmt --check
- uses: https://github.com/Swatinem/rust-cache@v2 - uses: https://github.com/Swatinem/rust-cache@v2
with: with: