Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

generate-elastic-stack-releases #56

generate-elastic-stack-releases

generate-elastic-stack-releases #56

---
name: generate-elastic-stack-releases
on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * 1-5'
permissions:
contents: read
jobs:
generate-releases:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
with:
registry: docker.elastic.co
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- run: .ci/generate-releases.sh
env:
GH_TOKEN: ${{ github.token }}
- name: 'Get service account'
uses: hashicorp/vault-action@v2.7.4
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@v2'
with:
credentials_json: '${{ env.SERVICE_ACCOUNT }}'
- id: 'upload-file'
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: releases
destination: "artifacts-api"
parent: false
headers: |-
content-type: application/json
x-goog-meta-generator: generate-elastic-stack-releases.yml
- name: debug
run: echo "${{ steps.upload-file.outputs.uploaded }}"
- if: ${{ failure() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: '#observablt-bots'
message: ":traffic_cone: generate-elastic-stack-releases failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"