forked from Reuf12/apm-pipeline-library
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.22 KB
/
generate-elastic-stack-snapshots.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
---
name: generate-elastic-stack-snapshots
on:
workflow_dispatch:
schedule:
- cron: '0 */1 * * 1-5'
permissions:
contents: read
jobs:
generate-snapshots:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: .ci/generate-snapshots.sh
- name: 'Get service account'
uses: hashicorp/vault-action@v2.7.3
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
method: approle
secrets: |
secret/observability-team/ci/artifacts-api-bucket service-account | SERVICE_ACCOUNT ;
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ env.SERVICE_ACCOUNT }}'
- id: 'upload-file'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: snapshots
glob: "*.json"
destination: "artifacts-api"
headers: |-
content-type: application/json
x-goog-meta-generator: generate-elastic-stack-snapshots.yml
- name: debug
run: echo "${{ steps.upload-file.outputs.uploaded }}"