Skip to content

feat(lambda): convert to swift #333

feat(lambda): convert to swift

feat(lambda): convert to swift #333

name: Build pre-release version
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, edited, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TF_VAR_env: staging
TF_VAR_env_vars: ${{ secrets.LIVE_ENV_VARS }}
TF_VAR_zone_id: ${{ secrets.LIVE_ZONE_ID }}
TF_VAR_root_domain: lhowsam.com
TF_VAR_sub_domain: nowplaying.lhowsam.com
TF_VAR_private_key: ${{ secrets.STAGING_PRIVATE_KEY }}
TF_VAR_certificate_body: ${{ secrets.STAGING_CERTIFICATE_BODY }}
TF_VAR_certificate_chain: ${{ secrets.STAGING_CERTIFICATE_CHAIN }}
TF_VAR_deployed_by: ${{ github.actor }}
TF_VAR_git_sha: ${{ github.sha }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: luke-h1-project
TF_VAR_api_key: ${{ secrets.STAGING_API_KEY }}
TF_VAR_discord_webhook_url: ${{ secrets.DISCORD_ALERTS_WEBHOOK_URL}}
permissions: write-all
jobs:
deploy:
name: Deploy to staging
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Ensure rebased with main
run: ./scripts/ensure-rebased.sh
- name: Install
uses: ./.github/actions/install
- name: Validate
uses: ./.github/actions/validate
# - name: Changelogs
# uses: ./.github/actions/changelog
# with:
# prerelease: true
# publish: false
- name: fetch latest commits
run: git fetch && git pull
- name: Deploy
uses: ./.github/actions/deploy
with:
environment: staging
aws-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# - name: Get versions
# id: lambda-version
# run: |
# echo "::set-output name=LAMBDA_VERSION::$(./scripts/version.sh get)"
# echo "::set-output name=AUTHORIZER_VERSION::$(./scripts/version.sh get)"
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '* [Lambda version](https://nowplaying-${{env.TF_VAR_env}}.lhowsam.com) - `${{ steps.lambda-version.outputs.LAMBDA_VERSION }}`\n* [Authorizer version](https://nowplaying-${{env.TF_VAR_env}}.lhowsam.com) - `${{ steps.lambda-version.outputs.AUTHORIZER_VERSION }}`'
})