Skip to content

generate-elastic-stack-snapshots #3453

generate-elastic-stack-snapshots

generate-elastic-stack-snapshots #3453

---
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/[email protected]
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 }}"