-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (32 loc) · 1.36 KB
/
trello.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
name: Link Trello card
on:
pull_request:
types: [ opened , edited]
jobs:
attach-to-trello:
name: Link Trello card to this PR
if: "!contains( 'dependabot[bot] snyk-bot' , github.actor )"
runs-on: ubuntu-latest
environment: development_aks
steps:
- uses: Azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Fetch secrets from key vault
uses: azure/CLI@v2
id: fetch-secrets
with:
inlineScript: |
SECRET_VALUE=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "::add-mask::$SECRET_VALUE"
echo "SLACK-WEBHOOK=$SECRET_VALUE" >> $GITHUB_OUTPUT
SECRET_VALUE=$(az keyvault secret show --name "TRELLO-TOKEN" --vault-name "${{ secrets.INFRA_KEY_VAULT}}" --query "value" -o tsv)
echo "::add-mask::$SECRET_VALUE"
echo "TRELLO-TOKEN=$SECRET_VALUE" >> $GITHUB_OUTPUT
- name: Add Trello Comment
uses: DFE-Digital/github-actions/AddTrelloComment@master
with:
MESSAGE: ${{ github.event.pull_request.html_url }}
CARD: ${{ github.event.pull_request.body }}
TRELLO-KEY: ${{ steps.fetch-secrets.outputs.TRELLO-KEY }}
TRELLO-TOKEN: ${{ steps.fetch-secrets.outputs.TRELLO-TOKEN }}