Skip to content

Commit

Permalink
feat: add new CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoliber authored Feb 22, 2025
1 parent b139f6f commit bc45e78
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 49 deletions.
8 changes: 1 addition & 7 deletions .github/.releaserc.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
tagFormat: $${q}{version}
tagFormat: ${version}
branches:
- main
- master
- +([0-9])?(.{+([0-9]),x}).x
- { name: next, prerelease: true }
- { name: beta, prerelease: true }
- { name: alpha, prerelease: true }
- { name: stable, prerelease: true }
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
Expand Down
5 changes: 5 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"enabledManagers": ["terraform", "github-actions"]
}
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI Pipeline

on:
push:
tags: ["*"]
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs: {}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.10.5"

- name: Restore cache
uses: actions/cache@v4
with:
path: .terraform/
key: ${{ hashFiles('.terraform.lock.hcl') }}

- run: terraform init
- run: terraform fmt -check
- run: terraform validate -no-color

release:
needs: build
runs-on: ubuntu-latest
if: github.ref_protected && !startsWith(github.event.head_commit.message, 'chore')
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Semantic Release
run: cp .github/.releaserc.yml .
- uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: "@semantic-release/exec"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_API: ${{ github.api_url }}
42 changes: 0 additions & 42 deletions .github/workflows/cicd.yml

This file was deleted.

0 comments on commit bc45e78

Please sign in to comment.