Creating Serverless Environment by @amirbenun #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Serverless Environment | |
run-name: Creating Serverless Environment by @${{ github.actor }} | |
on: | |
workflow_dispatch: # TODO: remove | |
schedule: | |
- cron: '0 0 * * 1' # every Monday at 00:00 | |
jobs: | |
naming: | |
runs-on: ubuntu-latest | |
outputs: | |
deployment_name: ${{ steps.set_deployment_name.outputs.date-name }} | |
steps: | |
- name: Set deployment name | |
id: set_deployment_name | |
run: | | |
date_name=$(echo "weekly-env-$(date +'%d-%b')" | tr '[:upper:]' '[:lower:]') | |
echo "date-name=$date_name" >> $GITHUB_OUTPUT | |
deploy: | |
needs: naming | |
uses: ./.github/workflows/test-environment.yml | |
secrets: inherit | |
# Required for the 'Deploy' job in the 'test-environment.yml' to authenticate with Google Cloud (gcloud). | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
with: | |
deployment_name: ${{ needs.naming.outputs.deployment_name }} | |
# For now, the region is not used because it's overridden in the tf, but it's here for future compatibility. | |
ess-region: "aws-us-east-1" | |
elk-stack-version: 9.0.0-SNAPSHOT | |
serverless_mode: true | |
run-sanity-tests: true | |
expiration_days: 0 |