build(deps): bump linz/action-typescript from 3.0.0 to 3.1.0 #353
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: Build | |
on: | |
push: | |
jobs: | |
build: | |
name: Build and test on non-${{ github.event.repository.default_branch }} branches | |
if: github.ref != 'refs/heads/${{ github.event.repository.default_branch }}' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 # Enable checking Git history | |
- name: Get Node.js version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_ENV" | |
- name: Build and test with Node.js ${{ env.NODE_VERSION }} | |
uses: linz/action-typescript@9bf69b0f313b3525d3ba3116f26b1aff7eb7a6c0 # v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://npm.pkg.github.com | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Get Python version | |
run: echo "PYTHON_VERSION=$(cat .python-version)" >> "$GITHUB_ENV" | |
- name: Setup Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: pip | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Lint files | |
run: pre-commit run --all-files --verbose | |
- name: Check all commit messages | |
run: pre-commit run --hook-stage=manual --verbose | |
deploy: | |
runs-on: ubuntu-22.04 | |
# Avoid parallel deployments of any single environment. | |
# This hack emulates AWS credentials assumption below. | |
concurrency: ${{ github.ref == 'refs/heads/master' }} | |
permissions: | |
id-token: write | |
contents: write | |
packages: read | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Get Node.js version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_ENV" | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://npm.pkg.github.com/ | |
cache: npm | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Install production Node.js packages | |
run: npm ci --omit=dev | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 | |
with: | |
aws-region: ap-southeast-2 | |
role-to-assume: ${{ github.ref == 'refs/heads/master' && 'arn:aws:iam::434775598764:role/ContinuousIntegration-GitHubActionsRole4F1BBA26-U1I7SY11QA7D' || 'arn:aws:iam::623931144233:role/ContinuousIntegration-GitHubActionsRole4F1BBA26-WDE0O3ZN93A6' }} | |
- name: Deploy | |
run: npm run cdk deploy -- --method=direct --require-approval=never --strict --verbose |