-
-
Notifications
You must be signed in to change notification settings - Fork 7
24 lines (21 loc) · 1.15 KB
/
root-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: nanosaur_robot rebuild
# Reference:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
on: [push]
# https://github.com/docker/build-push-action
jobs:
notify:
name: "Notify"
runs-on: ubuntu-latest #self-hosted
steps:
- name: Set output
id: vars
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
- name: Notify
run: |
echo ${{ steps.vars.outputs.short_ref }}
curl -XPOST -u "${{ secrets.API_TOKEN_USERNAME}}:${{secrets.API_TOKEN_GITHUB}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/rnanosaur/nanosaur/actions/workflows/docker-image.yml/dispatches --data '{"ref": "${{ steps.vars.outputs.short_ref }}"}'
- name: Notify foxy
run: |
echo "notify on Foxy"
curl -XPOST -u "${{ secrets.API_TOKEN_USERNAME}}:${{secrets.API_TOKEN_GITHUB}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/rnanosaur/nanosaur/actions/workflows/docker-image.yml/dispatches --data '{"ref": "foxy"}'