diff --git a/.github/workflows/discord-news.yml b/.github/workflows/discord-news.yml new file mode 100644 index 00000000..9fb87104 --- /dev/null +++ b/.github/workflows/discord-news.yml @@ -0,0 +1,26 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +on: [pull_request] + + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Discord Commits + uses: Sniddl/discord-commits@v1.2 + with: + webhook: ${{ secrets. DISCORD_GIT_NEWS_WEBHOOK }} + message: "Successful commit to **{{ github.context.payload.repository.owner.name }}/{{ github.context.payload.repository.name}}**.\nDiff: {{ github.context.payload.compare }}" + embed: '{ "title": "{{ commit.title }}", "description": "{{ commit.description }}", "url": "{{ commit.url }}", "author": { "name": "{{ commit.author.name }} ({{ commit.author.username }})", "icon_url": "https://avatars.io/gravatar/{{ commit.author.email }}"} }'