Skip to content

Commit

Permalink
ci: add update-changelog workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed May 28, 2024
1 parent 786f610 commit 0dec768
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: update-changelog
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

jobs:
update-changelog:
runs-on: ubuntu-latest
steps:
- name: Generate Github App Token
uses: navikt/github-app-token-generator@v1
id: github-app-token
with:
app-id: ${{ vars.NIXOS_ASIA_APP_ID }}
private-key: ${{ secrets.NIXOS_ASIA_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: cachix/cachix-action@v14
with:
name: services-flake
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: "nix develop ./dev -c just changelog"
- name: Create PR
id: create-pr
uses: peter-evans/create-pull-request@v6
with:
branch: update_changelog
commit-message: |
chore: update changelog
delete-branch: true
title: "chore: update changelog"
token: ${{ steps.github-app-token.outputs.token }}
labels: |
automated
body: ""
- run: "gh pr merge --auto --rebase --delete-branch ${{ steps.create-pr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 0dec768

Please sign in to comment.