From 4bda036ba7c660bf04985450b39f48eea3e9bd78 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Sat, 20 Jul 2024 15:57:39 +0300 Subject: [PATCH] feat: Contributors actions Signed-off-by: Awiteb --- .forgejo/workflows/contributors.yml | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .forgejo/workflows/contributors.yml diff --git a/.forgejo/workflows/contributors.yml b/.forgejo/workflows/contributors.yml new file mode 100644 index 0000000..ba64ea7 --- /dev/null +++ b/.forgejo/workflows/contributors.yml @@ -0,0 +1,30 @@ +name: Update Contributors + +on: + push: + branches: [master] + +jobs: + update_contributors: + name: Update Contributors + runs-on: debian + steps: + - uses: actions/checkout@v4 + with: + ref: master + fetch-depth: 0 + - name: Install just + run: | + curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ./bin + - name: Update Contributors + run: | + ./bin/just contributors + if [ -n "$(git status --porcelain)" ]; then + git config user.name forgejo-actions + git config user.email forgejo-actions@noreply.localhost + git add CONTRIBUTORS.md + git commit -m "Update CONTRIBUTORS.md" + git push + else + echo "No changes to CONTRIBUTORS.md" + fi