This file contains hidden or 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
| jobs: | |
| path-check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| message: ${{ steps.check.outputs.message }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - id: check |
This file contains hidden or 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
| # build stage | |
| FROM ruby:3.2.2 AS builder | |
| WORKDIR /app | |
| ENV RAILS_ENV=production | |
| ENV NODE_ENV=production | |
| RUN apt-get update -qq && apt-get install --no-install-recommends -y \ | |
| build-essential \ |
This file contains hidden or 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
| ################### | |
| # DEVELOPMENT | |
| ################### | |
| FROM node:20.0.0-slim AS development | |
| WORKDIR /usr/src/app | |
| RUN apt-get update && apt-get -qq install -y --no-install-recommends \ | |
| tzdata \ | |
| tini \ |
This file contains hidden or 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
| import { createWriteStream, createReadStream } from 'fs'; | |
| import archiver from 'archiver'; | |
| import { basename } from 'path'; | |
| export const zipFile = async (sourceFilePath, outputZipPath) => { | |
| return new Promise((resolve, reject) => { | |
| const output = createWriteStream(outputZipPath); | |
| const archive = archiver('zip', { | |
| zlib: { level: 9 }, | |
| }); |
This file contains hidden or 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
| export const sleep = (ms) => { | |
| return new Promise((_, reject) => { | |
| setTimeout(() => { | |
| // 指定した時間が経過したら、エラーを生成してプロミスをrejectする | |
| reject(new Error('Lambda function timeout')); | |
| }, ms); | |
| }); | |
| }; | |
| export async function service(event) { |
This file contains hidden or 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
| #!/bin/bash | |
| # データベース接続情報 | |
| db_host="db_host" | |
| db_port=5432 | |
| db_name="db_name" | |
| db_user="db_user" | |
| db_password="db_password" | |
| # SSH接続情報 |
This file contains hidden or 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
| awk -F',' '{ print "'\''"$n"'\''," }' file.csv | pbcopy |