Skip to content

Commit

Permalink
ci: restructure workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nimdanitro committed Oct 2, 2024
1 parent 9a37548 commit 94e11d1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Test & Push Image
on:
push:
branches:
- "main"
- "develop"
tags:
- "v*"
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}
27 changes: 0 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,30 +107,3 @@ 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}

0 comments on commit 94e11d1

Please sign in to comment.