-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (32 loc) · 1.12 KB
/
build.yaml
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
35
36
37
38
39
#
# Copyright contributors to the Galasa project
#
# SPDX-License-Identifier: EPL-2.0
#
name: Trigger Helm workflow in Automation repository
on:
workflow_dispatch:
push:
branches: [main]
jobs:
trigger-workflow:
name: Trigger Helm workflow
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Trigger Helm workflow using GitHub CLI call
run: |
gh workflow run build-helm.yaml --repo https://github.com/galasa-dev/automation
env:
GH_TOKEN: ${{ secrets.GALASA_TEAM_GITHUB_TOKEN }}
report-failure:
name: Report failure in workflow
runs-on: ubuntu-latest
needs: trigger-workflow
if: failure()
steps:
- name: Report failure in workflow to Slack
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run : |
docker run --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/galasabld-ibm:main slackpost workflows --repo "helm" --workflowName "${{ github.workflow }}" --workflowRunNum "${{ github.run_id }}" --ref "${{ env.BRANCH }}" --hook "${{ env.SLACK_WEBHOOK }}"