Bump @types/node from 18.19.18 to 22.5.5 #3239
Workflow file for this run
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: CI-master | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
TZ: Asia/Hong_Kong | |
FORCE_COLOR: 1 | |
EARTHLY_STRICT: "true" | |
PUSH: "${{ github.repository_owner == 'giffon' && github.event_name == 'push' }}" | |
jobs: | |
job: | |
concurrency: ${{ github.ref }} | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/orgs/community/discussions/25678 | |
- name: Free disk space | |
run: rm -rf /opt/hostedtoolcache | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Configure AWS credentials | |
if: success() && env.PUSH == 'true' | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.awsAccessKeyId }} | |
aws-secret-access-key: ${{ secrets.awsSecretAccessKey }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR | |
if: success() && env.PUSH == 'true' | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Login to GitHub Container Registry | |
if: success() && env.PUSH == 'true' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: earthly/actions-setup@v1 | |
with: | |
version: "0.7.11" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build devcontainer image | |
run: earthly +devcontainer-ci --GIT_REF_NAME="${{ github.ref_name }}" --GIT_SHA="${{ github.sha }}" | |
env: | |
EARTHLY_PUSH: ${{ env.PUSH }} | |
EARTHLY_REMOTE_CACHE: "ghcr.io/giffon/charleywong_cache:master_devcontainer_workspace" | |
- name: Run test | |
run: earthly +test --TEST="$GITHUB_EVENT_NAME" | |
- name: Test build | |
run: earthly +test-build | |
- name: Create .envrc | |
if: success() && env.PUSH == 'true' && github.event_name == 'push' | |
run: | | |
cat > .envrc <<EOT | |
export GOOGLE_CLIENT_EMAIL="$GOOGLE_CLIENT_EMAIL" | |
export GOOGLE_PRIVATE_KEY="$GOOGLE_PRIVATE_KEY" | |
export AWS_DEFAULT_REGION="$AWS_DEFAULT_REGION" | |
export AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" | |
export AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" | |
export YBM_AWS_DEFAULT_REGION="$YBM_AWS_DEFAULT_REGION" | |
export YBM_AWS_ACCESS_KEY_ID="$YBM_AWS_ACCESS_KEY_ID" | |
export YBM_AWS_SECRET_ACCESS_KEY="$YBM_AWS_SECRET_ACCESS_KEY" | |
export FACEBOOK_TOKEN="$FACEBOOK_TOKEN" | |
export SERVERLESS_ACCESS_KEY="$SERVERLESS_ACCESS_KEY" | |
EOT | |
env: | |
GOOGLE_CLIENT_EMAIL: ${{ secrets.googleClientEmail }} | |
GOOGLE_PRIVATE_KEY: ${{ secrets.googlePrivateKey }} | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
YBM_AWS_DEFAULT_REGION: us-east-1 | |
YBM_AWS_ACCESS_KEY_ID: ${{ secrets.YBM_AWS_ACCESS_KEY_ID }} | |
YBM_AWS_SECRET_ACCESS_KEY: ${{ secrets.YBM_AWS_SECRET_ACCESS_KEY }} | |
FACEBOOK_TOKEN: ${{ secrets.FACEBOOK_TOKEN }} | |
SERVERLESS_ACCESS_KEY: ${{ secrets.serverlessAccessKey }} | |
- name: Build Lambda image | |
if: success() && env.PUSH == 'true' && github.event_name == 'push' | |
run: earthly +lambda-container --LAMBDA_IMAGE_TAG="${{ github.sha }}" | |
env: | |
EARTHLY_SECRET_FILES: envrc=.envrc | |
EARTHLY_PUSH: ${{ env.PUSH }} | |
EARTHLY_REMOTE_CACHE: "ghcr.io/giffon/charleywong_cache:master_lambda" | |
- name: Deploy | |
if: success() && env.PUSH == 'true' && github.event_name == 'push' | |
run: earthly +deploy --LAMBDA_IMAGE_TAG="${{ github.sha }}" --DEPLOY_STAGE="master" | |
env: | |
EARTHLY_SECRET_FILES: envrc=.envrc | |
- name: Post-deployment test | |
if: success() && env.PUSH == 'true' && github.event_name == 'push' | |
run: earthly +test --TEST="post-deployment master.charleywong.info" |