-
Notifications
You must be signed in to change notification settings - Fork 21
40 lines (39 loc) · 1.61 KB
/
dogfood.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
35
36
37
38
39
40
name: dogfood merge
# This workflow is triggered on pushes to master and dogfood branches
on:
push:
branches:
- master
- 'dogfood/**'
jobs:
dogfood_merge:
runs-on: ubuntu-latest
name: Update dogfood branch
permissions:
id-token: write # required for SonarSource/vault-action-wrapper
steps:
- name: get secrets
id: secrets
uses: SonarSource/vault-action-wrapper@dc8fe04652687f7278f3ecd27905967836bab0eb # tag=2.7.4-1
with:
secrets: |
development/github/token/{REPO_OWNER_NAME_DASH}-dogfood-merge token | dogfood_token;
- name: git octopus step
env:
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).dogfood_token }}
id: dogfood
uses: SonarSource/gh-action_dogfood_merge@v1
with:
dogfood-branch: 'dogfood-on-peach'
# Use the output from the `dogfood` step
- name: Get the name of the dogfood branch and its HEAD SHA1
run: echo "The dogfood branch was `${{ steps.dogfood.outputs.dogfood-branch }}` and its HEAD SHA1 was `${{ steps.dogfood.outputs.sha1 }}`"
# Notify on Slack
- name: Notify failures on Slack
if: failure()
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
env:
SLACK_BOT_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SLACK_BOT_TOKEN }}
with:
channel-id: squad-mobile
slack-message: "Dogfood build for `${{ steps.dogfood.outputs.sha1 }}`: *failed*, see the logs at https://github.com/SonarSource/sonar-kotlin/actions/workflows/dogfood.yml"