Skip to content

Commit

Permalink
chore(changelog): create changelog generation
Browse files Browse the repository at this point in the history
  • Loading branch information
nimdanitro committed Oct 2, 2024
1 parent 942897d commit cba3c59
Show file tree
Hide file tree
Showing 6 changed files with 652 additions and 181 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Automated Tests and Linting

on:
push:
branches-ignore:
Expand All @@ -18,11 +17,9 @@ jobs:
node-version-file: ".nvmrc"
cache: yarn
cache-dependency-path: "ui/yarn.lock"

- name: Install packages
run: yarn install --immutable
working-directory: ui

- name: Run tests
run: yarn test
working-directory: ui
33 changes: 33 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- "main"
- "develop"
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate changelog
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit
run: |
git checkout ${GITHUB_REF_NAME}
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "chore(changelog): Update changelog [skip ci]"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git ${GITHUB_REF_NAME}
31 changes: 28 additions & 3 deletions .github/workflows/docker-image.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Build & Test & Push Image

on:
push:
branches:
Expand All @@ -15,7 +14,7 @@ jobs:
build:
runs-on: ubuntu-latest
name: "Test and Build"
steps:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
Expand Down Expand Up @@ -81,7 +80,6 @@ jobs:
build-args: |
VERSION=${{ steps.meta.outputs.version }}
GIT_SHA=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
- name: Docker meta for hasura
id: meta-hasura
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -109,3 +107,30 @@ jobs:
labels: ${{ steps.meta-hasura.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
changelog:
name: Generate changelog
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate changelog
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit
run: |
git checkout ${GITHUB_REF_NAME}
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "chore(changelog): Update changelog [skip ci]"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git ${GITHUB_REF_NAME}
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -15,7 +15,13 @@ repos:
- id: golangci-lint
- id: go-unit-tests
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
exclude: "(example|hasura|docs)/.*"
Loading

0 comments on commit cba3c59

Please sign in to comment.