Skip to content

Commit

Permalink
feat(ceph_exporter): Add ci for building and releasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADustyOldMuffin committed Mar 28, 2024
1 parent 439055e commit 040b938
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 179 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This should build and push images to the Github Registry on branches, PRs, and tags.
name: Build image

on:
push:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
type=ref,event=pr
type=ref,event=branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
56 changes: 0 additions & 56 deletions .github/workflows/build_and_push.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/license.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Create releases

on:
push:
branches:
- "main"

jobs:
create-releases:
runs-on: ubuntu-latest

permissions:
issues: write
pull-requests: write
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/run_build.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/run_tests.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
branches:
- main
preset: "angular"
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- "@semantic-release/github"
repositoryUrl: "[email protected]/coreweave/ceph_exporter.git"
analyzeCommits:
- path: "@semantic-release/commit-analyzer"
releaseRules:
- type: "feature"
release: "minor"
- type: "update"
release: "minor"
- type: "refactor"
release: "patch"
- type: "bugfix"
release: "patch"
- type: "docs"
release: "patch"
parserOpts:
noteKeywords:
- "BREAKING CHANGE"
- "BREAKING CHANGES"
- "BREAKING"
- "BREAKS"
publish:
- path: "@semantic-release/github"
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "ceph_exporter"
}

0 comments on commit 040b938

Please sign in to comment.