Skip to content

Commit

Permalink
fix(cicd): update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxd committed Apr 26, 2024
1 parent 1e50b76 commit a436882
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 50 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}"
20 changes: 0 additions & 20 deletions .github/workflows/molecule.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/pre-commit.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/semantic-release.yml

This file was deleted.

0 comments on commit a436882

Please sign in to comment.