-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (56 loc) · 1.4 KB
/
ci.yaml
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
---
on:
push:
branches:
- "*"
tags:
- "v*.*.*"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup
run: make setup
- uses: pre-commit/action@v3.0.1
env:
SKIP: "no-commit-to-branch"
molecule:
runs-on: ubuntu-latest
env:
ANSIBLE_FORCE_COLOR: true
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup
run: make setup
- name: Molecule
run: |
molecule --debug test --scenario-name default
semantic-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- pre-commit
- molecule
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CICD_APP_ID }}
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"