Skip to content

Commit

Permalink
chore: apply GitHub Actions workflow lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed Aug 1, 2023
1 parent 487b930 commit 7b2f617
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ name: main

on:
push:
branches: []
tags: []
branches:
- "*"
tags:
- "*"
pull_request:
branches: []
branches:
- "*"

jobs:
build-and-test:
Expand Down Expand Up @@ -84,13 +87,14 @@ jobs:
set -evx
curl -o /tmp/web-flow.gpg "$WEB_FLOW_KEY_URL"
gpg --import /tmp/web-flow.gpg
# shellcheck disable=SC2126
if ! git verify-commit "$GITHUB_REF_NAME" && \
[[ "$( git cat-file -p "$GITHUB_REF_NAME" \
| grep -Ei '^parent\s+[0-9a-f]{40}$' | wc -l )" -lt 2 ]]; then
echo "::error title=Invalid tag commit::Tags must refer to a merge" \
"commit or a commit signed by GitHub web-flow" \
"($WEB_FLOW_KEY_URL). The tag $GITHUB_REF_NAME refers to " \
"a commit $(git rev-parse $GITHUB_REF_NAME) which is neither" \
"a commit $(git rev-parse "$GITHUB_REF_NAME") which is neither" \
"a merge commit nor signed by GitHub web-flow."
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
project_suffix=dev.${{ github.sha }}
dotnet_args="$dotnet_args --version-suffix $project_suffix"
fi
dotnet build $dotnet_args
dotnet pack $dotnet_args
dotnet build "$dotnet_args"
dotnet pack "$dotnet_args"
- name: push
if: github.event_name != 'pull_request'
run: |
Expand Down

0 comments on commit 7b2f617

Please sign in to comment.