-
Notifications
You must be signed in to change notification settings - Fork 50
54 lines (47 loc) · 1.39 KB
/
gitlab-helper.yml
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
44
45
46
47
48
49
50
51
52
53
54
# This workflow runs on PRs and the merge queue and is responsible for starting
# the "Start GitLab CI" workflow in a way that makes it possible to use
# secrets. The workflow first runs source preparation to make sure that the
# gitlab-ci.yml is up to date.
---
name: GitLab
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- "*"
# for merge queue
merge_group:
jobs:
prepare:
name: "🔍 Check source preparation"
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: "1.21"
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
- name: Check that source has been prepared
run: |
./tools/prepare-source.sh
if [ -n "$(git status --porcelain)" ]; then
echo
echo "Please include these changes in your branch: "
git status -vv
exit "1"
else
exit "0"
fi
gitlab-ci-helper:
name: "Gitlab CI trigger helper"
runs-on: ubuntu-latest
steps:
- name: Trigger
run: echo "GitLab trigger complete"