my-neovim-pluginlist/.github/workflows/trigger_new_rss.yml

29 lines
974 B
YAML
Raw Normal View History

2023-05-24 22:26:48 +00:00
name: Trigger new rss
on:
push:
branches:
- main
jobs:
github:
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
2023-05-24 22:32:46 +00:00
- run: |
apt update
apt-get install -y git curl
2023-05-25 00:53:25 +00:00
- run: git clone ${{ github.server_url }}/${{ github.repository }}
2023-05-24 22:55:38 +00:00
- name: latest commit message
run: |
2023-05-25 01:06:38 +00:00
echo LATEST_MESSAGE=$(git log --no-merges -n 1 --pretty=%s) >> $GITHUB_ENV
2023-05-25 01:04:29 +00:00
working-directory: ${{ github.event.repository.name }}
2023-05-24 22:26:48 +00:00
- name: check commit message
2023-05-25 00:17:05 +00:00
run: echo $LATEST_MESSAGE
2023-05-24 22:26:48 +00:00
- run: |
curl -X POST -H "Authorization: token $GH_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/yutkat/new-neovim-plugin-with-category-rss/dispatches -d '{"event_type":"trigger-new-repo"}'
env:
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2023-05-24 22:55:38 +00:00
if: env.LATEST_MESSAGE == 'Add'
2023-05-25 01:04:29 +00:00
working-directory: ${{ github.event.repository.name }}