-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 940 Bytes
/
check.yml
File metadata and controls
43 lines (36 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Check
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
env:
REPOSITORY: ${{ github.repository }}
SERVER_URL: ${{ github.server_url }}
SHA: ${{ github.sha }}
run: |
set -euo pipefail
git init .
git remote add origin "$SERVER_URL/$REPOSITORY.git"
git -c protocol.version=2 fetch --no-tags --depth=1 origin "$SHA"
git checkout --detach FETCH_HEAD
- name: Install test tools
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y --no-install-recommends shellcheck gnupg
- name: Run checks
run: bash scripts/check.sh