-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.21 KB
/
Copy pathci.yml
File metadata and controls
53 lines (49 loc) · 1.21 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
name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- "**"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- run: make install-deps
- uses: actions/cache@v5
with:
path: ~/.cache/prek
key: prek|${{ runner.os }}|${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
prek|${{ runner.os }}|
- uses: j178/prek-action@v2
with:
extra-args: --all-files --hook-stage pre-commit
publish:
needs: check
if: github.ref == 'refs/heads/main'
uses: hu553in/common-things/.github/workflows/build-publish-docker.yml@main
secrets: inherit
permissions:
contents: read
packages: write
with:
image: ghcr.io/${{ github.repository }}
attest:
needs: publish
uses: hu553in/common-things/.github/workflows/attest-docker.yml@main
permissions:
packages: write
id-token: write
attestations: write
with:
image: ghcr.io/${{ github.repository }}
digest: ${{ needs.publish.outputs.digest }}