Skip to content

Instantly share code, notes, and snippets.

View seye2's full-sized avatar

DONGHOON NAM seye2

  • seoul, korea
View GitHub Profile
@seye2
seye2 / Tabs.jsx
Created July 12, 2017 12:44
함수형 컴포넌트 : 탭
import React from 'react';
import PropTypes from 'prop-types';
const Tabs = ({active, list}) => (
<div className="tabs">
<div className="tabs__row">
{list.map((tab, i) => (<div className="tabs__col"><button className={((i + 1) === active) ? "is-on" : ""} onClick={tab.label} onClick={tab.onClick} key={i} /></div>))}
</div>
</div>
);
@seye2
seye2 / gist:627ffa15d05b3fdd1c8358f6bfac2f68
Last active December 28, 2019 11:28
Github Actions#2 branch별 S3배포하기
name: React build
on:
push: # master, develop Branch에서 push 이벤트가 일어났을 때만 실행
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-18.04
@seye2
seye2 / github actions example2
Created December 29, 2019 14:45
job, needs, if 사용 코드
name: React build
on:
push: # master, develop Branch에서 push 이벤트가 일어났을 때만 실행
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-18.04
const core = require("@actions/core");
const { IncomingWebhook } = require("@slack/webhook");
async function run() {
try {
const GITHUB_EVENT = require(process.env.GITHUB_EVENT_PATH);
const GITHUB_WORKFLOW = process.env.GITHUB_WORKFLOW;
const ACTION_NAME = core.getInput("ACTION_NAME");
const JOB = JSON.parse(core.getInput("JOB"));
const SLACK_WEBHOOK_URL = core.getInput("SLACK_WEBHOOK_URL");
- name: Get yarn cache
id: yarn-cache
run: |
echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
name: React build
on:
push: # master, develop Branch에서 push 이벤트가 일어났을 때만 실행
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-18.04
@seye2
seye2 / gist:bde93e0809056af1bfe6791d7ec1a65b
Created January 5, 2020 06:05
Github Actions Schedule#1
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/15 * * * *'
@seye2
seye2 / gist:78ab0b2fdde9db002b1f9ed827c81622
Created January 5, 2020 06:06
Github Actions Schedule#2
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)
│ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
│ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
│ │ │ │ │
│ │ │ │ │
│ │ │ │ │
* * * * *
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '* 0 * * 1'
jobs:
main:
name: main
runs-on: ubuntu-latest
steps:
tap "dkanejs/aws-session-manager-plugin"
tap "github/gh"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
brew "autoconf"
brew "automake"
brew "awscli"
brew "circleci", link: false