Skip to content

Commit

Permalink
Update to public bot defaults action
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Aug 9, 2022
1 parent e9b17b5 commit b9671b9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 88 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: changelog
on:
workflow_dispatch:
release:
types: [released]
workflow_dispatch:

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: πŸ€– defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}

- name: 🀘 checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main

- name: πŸ” defaults
uses: ./.github/workflows/defaults
env:
GH_TOKEN_SECRET: ${{ secrets.GH_TOKEN }}
BOT_NAME_SECRET: ${{ secrets.BOT_NAME }}
BOT_EMAIL_SECRET: ${{ secrets.BOT_EMAIL }}
BOT_AUTHOR_SECRET: ${{ secrets.BOT_AUTHOR }}
token: ${{ env.GH_TOKEN }}

- name: βš™ ruby
uses: ruby/setup-ruby@v1
Expand All @@ -30,11 +30,9 @@ jobs:
- name: βš™ changelog
run: |
gem install github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/.github_changelog_generator
- name: πŸš€ changelog
run: |
git config --local user.name $BOT_NAME
git config --local user.email $BOT_EMAIL
git add changelog.md
(git commit -m "πŸ–‰ Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
(git commit -m "πŸ–‰ Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"
59 changes: 0 additions & 59 deletions .github/workflows/defaults/action.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/dotnet-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
sync:
runs-on: windows-latest
steps:
- name: πŸ€– defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}

- name: 🀘 checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: main

- name: πŸ” defaults
uses: ./.github/workflows/defaults
env:
GH_TOKEN_SECRET: ${{ secrets.GH_TOKEN }}
BOT_NAME_SECRET: ${{ secrets.BOT_NAME }}
BOT_EMAIL_SECRET: ${{ secrets.BOT_EMAIL }}
BOT_AUTHOR_SECRET: ${{ secrets.BOT_AUTHOR }}
token: ${{ env.GH_TOKEN }}

- name: βŒ› rate
shell: pwsh
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/includes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ jobs:
includes:
runs-on: ubuntu-latest
steps:
- name: πŸ€– defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}

- name: 🀘 checkout
uses: actions/checkout@v2

- name: πŸ” defaults
uses: ./.github/workflows/defaults
env:
GH_TOKEN_SECRET: ${{ secrets.GH_TOKEN }}
BOT_NAME_SECRET: ${{ secrets.BOT_NAME }}
BOT_EMAIL_SECRET: ${{ secrets.BOT_EMAIL }}
BOT_AUTHOR_SECRET: ${{ secrets.BOT_AUTHOR }}
with:
token: ${{ env.GH_TOKEN }}

- name: +Mᐁ includes
uses: devlooped/actions-include@v1
Expand Down

0 comments on commit b9671b9

Please sign in to comment.