-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (60 loc) · 1.75 KB
/
Copy pathci.yml
File metadata and controls
71 lines (60 loc) · 1.75 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
check-containerfile:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.filter.outputs.containerfile }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
containerfile:
- '.github/workflows/Containerfile'
build-image:
runs-on: ubuntu-latest
needs: check-containerfile
if: needs.check-containerfile.outputs.changed == 'true'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .github/workflows
file: .github/workflows/Containerfile
push: ${{ github.event_name == 'push' }}
tags: ghcr.io/igalia/wig-ci:latest
build:
runs-on: ubuntu-latest
needs: build-image
if: always() && (needs.build-image.result == 'success' || needs.build-image.result == 'skipped')
container:
image: ghcr.io/igalia/wig-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
- name: Configure Project
run: meson setup _build
- name: Compile Project
run: meson compile -C _build
- name: Analyze Project
run: ninja -C _build clang-tidy
- name: Check Meson Formatting
run: meson format --check-only --recursive