Skip to content

Commit 2c7f6ff

Browse files
authored
Merge pull request #72 from rwxd/fix
fix(cicd): update workflow
2 parents 1e50b76 + a436882 commit 2c7f6ff

File tree

4 files changed

+66
-50
lines changed

4 files changed

+66
-50
lines changed

.github/workflows/ci.yaml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.12'
17+
18+
- name: Setup
19+
run: make setup
20+
21+
- uses: pre-commit/[email protected]
22+
env:
23+
SKIP: "no-commit-to-branch"
24+
25+
molecule:
26+
runs-on: ubuntu-latest
27+
env:
28+
ANSIBLE_FORCE_COLOR: true
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.12'
36+
37+
- name: Setup
38+
run: make setup
39+
40+
- name: Molecule
41+
run: |
42+
molecule --debug test --scenario-name default
43+
44+
semantic-release:
45+
runs-on: ubuntu-latest
46+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
47+
needs:
48+
- pre-commit
49+
- molecule
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
with:
54+
persist-credentials: false
55+
56+
- name: Generate a token
57+
id: generate_token
58+
uses: actions/create-github-app-token@v1
59+
with:
60+
app-id: ${{ secrets.CICD_APP_ID }}
61+
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
62+
63+
- name: Semantic Release
64+
uses: cycjimmy/semantic-release-action@v3
65+
env:
66+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"

.github/workflows/molecule.yml

-20
This file was deleted.

.github/workflows/pre-commit.yml

-19
This file was deleted.

.github/workflows/semantic-release.yml

-11
This file was deleted.

0 commit comments

Comments
 (0)