Fail release workflow if not in tags
stable / fmt Details

This commit is contained in:
chmanie 2023-06-12 21:36:20 +02:00
parent 18671683ff
commit c37687e026
2 changed files with 9 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,13 @@ 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:
if: github.repository == 'octo-org/octo-repo-prod'
- 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: