-
Notifications
You must be signed in to change notification settings - Fork 48
34 lines (30 loc) · 1.21 KB
/
build-docker-images.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
25
26
27
28
29
30
31
32
33
34
name: Webhook trigger for code repository
# This action will send a payload to the icub-tech-iit/docker-deployment-images github repository in order to build the correct
# tagged image for superbuild
on:
release:
types: [published]
jobs:
job_id:
runs-on: [ubuntu-latest]
steps:
- name: Get the version
id: get_version
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Get Token
id: get_workflow_token
uses: tibdex/github-app-token@v2
with:
private_key: ${{ secrets.ICUB_TECH_IIT_APP_KEY }}
app_id: ${{ secrets.ICUB_TECH_IIT_APP_ID }}
installation_retrieval_mode: repository
installation_retrieval_payload: icub-tech-iit/code
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
env:
GITHUB_APPS_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
with:
token: ${{ env.GITHUB_APPS_TOKEN }}
repository: icub-tech-iit/docker-deployment-images
event-type: release_trigger
client-payload: '{"version": "${{ steps.get_version.outputs.VERSION }}"}'