-
-
Notifications
You must be signed in to change notification settings - Fork 197
81 lines (71 loc) · 2.42 KB
/
merge.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Merge
on:
push:
branches:
- master
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
id-token: write
contents: write
jobs:
analysis:
name: Analyze
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ vars.VAULT_URL }}
role: sonarqube
method: jwt
namespace: admin
secrets: |
secret/data/cicd/sonarqube/global SONAR_TOKEN |SONAR_TOKEN ;
secret/data/cicd/sonarqube/global SONAR_HOST_URL | SONAR_HOST_URL;
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ steps.secrets.outputs.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ steps.secrets.outputs.SONAR_HOST_URL }}
techdocs:
name: Techdocs
runs-on: ubuntu-latest
env:
ENTITY_NAMESPACE: 'default'
ENTITY_KIND: 'component'
ENTITY_NAME: 'figma-plugin'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build docs
run: docker-compose run techdocs
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ vars.VAULT_URL }}
role: techdocs
method: jwt
namespace: admin
secrets: |
${{ vars.TECHDOCS_VAULT_PATH }} access_key | AWS_ACCESS_KEY_ID ;
${{ vars.TECHDOCS_VAULT_PATH }} secret_key | AWS_SECRET_ACCESS_KEY ;
${{ vars.TECHDOCS_VAULT_PATH }} security_token | AWS_SESSION_TOKEN ;
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ steps.secrets.outputs.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ steps.secrets.outputs.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ steps.secrets.outputs.AWS_SESSION_TOKEN }}
aws-region: eu-central-1
- name: Copy files to the production website with the AWS CLI
run: |
aws s3 sync ./techdocs ${{ vars.TECHDOCS_S3_PATH }}/${ENTITY_NAMESPACE}/${ENTITY_KIND}/${ENTITY_NAME}/ --delete