chore(ci): report gate result as ci-ok/ci-fail tags + scripts/ci-status.sh
gates / consistency-and-conventions (push) Successful in 45s
gates / consistency-and-conventions (push) Successful in 45s
This commit is contained in:
@@ -2,6 +2,7 @@ name: gates
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@@ -10,9 +11,26 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run the repo gates (gen drift, check, lint)
|
||||
id: gates
|
||||
run: |
|
||||
set -e
|
||||
make gen
|
||||
git diff --exit-code
|
||||
make check
|
||||
make lint
|
||||
- name: Report gate result as a git tag (ci-ok/<sha> / ci-fail/<sha>)
|
||||
if: always() && github.event_name == 'push'
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: |
|
||||
if [ "${{ steps.gates.conclusion }}" = "success" ]; then
|
||||
tag="ci-ok/$GITHUB_SHA"
|
||||
else
|
||||
tag="ci-fail/$GITHUB_SHA"
|
||||
fi
|
||||
if git rev-parse -q --verify "refs/tags/$tag" >/dev/null; then
|
||||
echo "tag already present: $tag"
|
||||
else
|
||||
git tag "$tag" "$GITHUB_SHA"
|
||||
git push "http://oauth2:${GITEA_TOKEN}@gitea.skink-platy.ts.net:3000/admin/Linux_post_install.git" "refs/tags/$tag"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user