Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
29d3007
add push.yaml
heesunkimm Oct 26, 2024
7ba5e84
add push.yaml
heesunkimm Oct 26, 2024
35edae8
add push.yaml
heesunkimm Oct 26, 2024
2db2254
add pull_request.yaml
heesunkimm Oct 26, 2024
aeba2d8
add pull_request.yaml
heesunkimm Oct 26, 2024
6fd27b1
add issue.yaml
heesunkimm Oct 26, 2024
14f08e1
add issue.yaml
heesunkimm Oct 26, 2024
c699fe7
add issue_comment.yaml
heesunkimm Oct 26, 2024
9c01b60
add issue_comment.yaml
heesunkimm Oct 26, 2024
d324da5
Update README.md
heesunkimm Oct 26, 2024
76c337f
workflow-dispatch.yaml
heesunkimm Oct 26, 2024
bb931f8
add multiple_event.yaml
heesunkimm Oct 26, 2024
eb26306
add needs.yaml
heesunkimm Oct 26, 2024
b5829a1
add checkout.yaml
heesunkimm Oct 26, 2024
e6e5ba2
add context.yaml
heesunkimm Oct 26, 2024
ecc5fa2
add context.yaml
heesunkimm Oct 26, 2024
17b347b
add branch_filter.yaml
heesunkimm Oct 26, 2024
79ee8a8
add path_filter.yaml
heesunkimm Oct 26, 2024
95e4795
add path_filter.yaml
heesunkimm Oct 26, 2024
d885a08
add path_filter.yaml
heesunkimm Oct 26, 2024
eaa84e8
add path_filter.yaml
heesunkimm Oct 26, 2024
9ac2302
add path_filter.yaml
heesunkimm Oct 26, 2024
03b5369
add tag_filter.yaml
heesunkimm Oct 26, 2024
67f51e0
add timeout.yaml
heesunkimm Oct 26, 2024
6a99952
add timeout.yaml
heesunkimm Oct 26, 2024
b829e1b
add timeout.yaml
heesunkimm Oct 26, 2024
7f61bc6
add timeout.yaml
heesunkimm Oct 26, 2024
ca0a2c8
add timeout.yaml
heesunkimm Oct 26, 2024
53865f1
add timeout.yaml
heesunkimm Oct 26, 2024
ed9746b
add cache.yaml
heesunkimm Oct 26, 2024
76a0aec
add cache.yaml
heesunkimm Oct 26, 2024
bd41bb1
add artifact.yaml
heesunkimm Oct 26, 2024
1409a54
add artifact.yaml
heesunkimm Oct 26, 2024
4ba5c85
add artifact.yaml
heesunkimm Oct 26, 2024
9c8f185
add artifact.yaml
heesunkimm Oct 26, 2024
fe15569
add output.yaml
heesunkimm Oct 30, 2024
95a2615
add output.yaml
heesunkimm Oct 30, 2024
74bfc11
add var-1.yaml
heesunkimm Oct 30, 2024
e6d7dee
add var-1.yaml
heesunkimm Oct 30, 2024
b12e68a
add var-1.yaml
heesunkimm Oct 30, 2024
1c159f3
add var-2.yaml
heesunkimm Oct 30, 2024
358b079
add secrets.yaml
heesunkimm Oct 30, 2024
00d3307
add environment.yaml
heesunkimm Oct 30, 2024
6004dd2
add environment.yaml
heesunkimm Oct 30, 2024
9e727e8
add environment.yaml
heesunkimm Oct 30, 2024
9e4f429
add matrix.yaml
heesunkimm Oct 30, 2024
d393062
add if-1.yaml
heesunkimm Oct 30, 2024
42c7651
add if-1.yaml
heesunkimm Oct 30, 2024
0fab50e
add if-1.yaml
heesunkimm Oct 30, 2024
c89befc
add if-2.yaml
heesunkimm Oct 30, 2024
135cb26
add if-2.yaml
heesunkimm Oct 30, 2024
92fc6b3
add if-2.yaml
heesunkimm Oct 30, 2024
2d807fe
start-function.yaml
heesunkimm Oct 30, 2024
74ebd75
add create_repo.yaml
heesunkimm Oct 31, 2024
852037c
add create_repo.yaml
heesunkimm Oct 31, 2024
8b95da7
add create_repo.yaml
heesunkimm Oct 31, 2024
1c360ff
add create_repo.yaml
heesunkimm Oct 31, 2024
bdd40e2
add create_repo.yaml
heesunkimm Oct 31, 2024
3d9939c
add create_repo.yaml
heesunkimm Oct 31, 2024
b2279cd
add create_repo.yaml
heesunkimm Oct 31, 2024
a2c06fe
add issue_notify.yaml
heesunkimm Oct 31, 2024
fc139cd
add issue_notify.yaml
heesunkimm Oct 31, 2024
b0bc27f
add issue_notify.yaml
heesunkimm Oct 31, 2024
fce049d
add issue_notify.yaml
heesunkimm Oct 31, 2024
24c5ddc
add issue_notify.yaml
heesunkimm Oct 31, 2024
be272bf
add issue_notify.yaml
heesunkimm Oct 31, 2024
a5ad71a
add cicd-1.yaml
heesunkimm Nov 9, 2024
a5bb82b
Update App.js
heesunkimm Nov 9, 2024
a6c25c7
Update App.js
heesunkimm Nov 9, 2024
21b8f61
Merge pull request #19 from heesun-action/feature-cicd1
heesunkimm Nov 9, 2024
88a1307
Merge pull request #7 from heesun-action/issue-comment-test2
heesunkimm Nov 9, 2024
b7455cb
add cicd-1.yaml
heesunkimm Nov 9, 2024
0db9f34
add cicd-1.yaml
heesunkimm Nov 9, 2024
3f12544
Update cicd-1.yaml
heesunkimm Nov 9, 2024
1180280
Update App.js
heesunkimm Nov 9, 2024
dcbbdf8
Update App.js
heesunkimm Nov 9, 2024
2a14170
add cicd-1.yaml
heesunkimm Nov 9, 2024
c675315
Merge remote-tracking branch 'origin/dev' into dev
heesunkimm Nov 9, 2024
328b172
Update App.js
heesunkimm Nov 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/cicd-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cicd-1
on:
pull_request:
type: [opened, synchronize, closed] # close를 정의해야 merge될 때 동작제어 가능
branches: [dev]
paths:
- 'my-app/**'

jobs:
test: # ci를 위해 실행하는 job
if: github.event.action == 'opened' || github.event.action == 'synchronize'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

image-build: # pr이 merge되면 실행 (cd단계)
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

deploy: # image-bulid 잡이 성공한 다음 실행 (cd단계)
runs-on: ubuntu-latest
needs: [ image-build ]
steps:
- name: checkout
uses: actions/checkout@v4
15 changes: 15 additions & 0 deletions .github/workflows/part1/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: issue-workflow
on:
issues:
types: [opened]

jobs:
issue-job: # 디폴트 브랜치에서만 트리거됨
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github action
17 changes: 17 additions & 0 deletions .github/workflows/part1/issue_comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: issue-comment-workflow
on: issue_comment

jobs:
pr-comment:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: pr comment
run: echo ${{ github.event.issue.pull_request }}

issue-comment:
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: issue comment
run: echo ${{ github.event.issue.pull_request }}
17 changes: 17 additions & 0 deletions .github/workflows/part1/multiple_event.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: multiple-event-workflow
on:
push:
issues:
types: [opened]
workflow_dispatch:

jobs:
multiple-event-job:
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github action
29 changes: 29 additions & 0 deletions .github/workflows/part1/needs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: needs
on: push

jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: echo
run: echo "job1 done"

job2:
runs-on: ubuntu-latest
needs: [job1]
steps:
- name: echo
run: echo "job2 done"
job3:
runs-on: ubuntu-latest
steps:
- name: echo
run: |
echo "job3 failed"
exit 1
job4:
runs-on: ubuntu-latest
needs: [job3]
steps:
- name: echo
run: echo "job4 done"
15 changes: 15 additions & 0 deletions .github/workflows/part1/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: pull-request-workflow 1
on:
pull_request:
types: [opened] # pull_request가 생성된 시점에만 업데이트 해주고 싶을때

jobs:
pull-request-job:
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github action
13 changes: 13 additions & 0 deletions .github/workflows/part1/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: push-workflow 2 # 액션창에서 표현될 명칭 (생략가능)
on: push #어떤 이벤트로 인해 깃허브액션을 트리거 시킬지

jobs: # 실행시킬 job의 집합 (필수값)
push-job:
runs-on: ubuntu-latest #job 안에 실행시킬 runner 지정
steps: # step의 집합
- name: step1 # step의 이름 (생략가능)
run: echo hello world
- name: step2
run: | # | 사용시 멀티라인 커멘드 사용가능
echo hello world
echo github action
11 changes: 11 additions & 0 deletions .github/workflows/part1/schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: schedule-workflow
on:
schedule:
- cron: '15 * * * *'

jobs:
schedule-job:
runs-on: ubuntu-latest
steps:
- name: schedule test
run: echo hello world
33 changes: 33 additions & 0 deletions .github/workflows/part1/workflow_dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: workflow-dispatch
on:
workflow_dispatch:
inputs:
name:
description: 'set name' # name이라는 input에 대한 설명
required: true # input의 필수값 여부
default: 'github-actions' # input의 기본값
type: string # 사용할 데이터 타입
environment:
description: 'set env'
required: true
default: 'dev'
type: choice
options:
- dev
- qa
- prod

jobs:
workflow-dispatch-job: # 디폴트 브랜치에서만 트리거됨
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github action
- name: echo inputs
run: |
echo ${{ inputs.name }}
echo ${{ inputs.environment }}
25 changes: 25 additions & 0 deletions .github/workflows/part2/artifact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: artifact
on: push

jobs:
upload-artifact:
runs-on: ubuntu-latest
steps:
- name: echo
run: echo hello-world > hello.txt
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: artifact-test
path: ./hello.txt
download-artifact:
runs-on: ubuntu-latest
needs: [upload-artifact]
steps:
- name: download artifact
uses: actions/download-artifact@v3
with:
name: artifact-test
path: ./
- name: check
run: cat hello.txt
11 changes: 11 additions & 0 deletions .github/workflows/part2/branch-filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: branch-filter
on:
push:
branches: ["dev"]

jobs:
branch-filter:
runs-on: ubuntu-latest
steps:
- name: echo
run: echo hello
31 changes: 31 additions & 0 deletions .github/workflows/part2/cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: cache
on:
push:
paths:
- 'my-app/**'

jobs:
cache:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: action/checkout@v4
- name: setup-node
uses: action/setup-node@v3
with:
node-version: 18
- name: Cache Node.js modules
uses: action/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
cd my-app
npm ci
- name: npm build
run: |
cd my-app
npm run billd
17 changes: 17 additions & 0 deletions .github/workflows/part2/checkout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: checkout
on: workflow_dispatch

jobs:
no-checout:
runs-on: ubuntu-latest
steps:
- name: check file list
run: cat README.md

checout:
runs-on: ubuntu-latest
steps:
- name : use checkout action
uses: actions/checkout@v4
- name: check file list
run: cat README.md
13 changes: 13 additions & 0 deletions .github/workflows/part2/context.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: context
on: workflow_dispatch

jobs:
context:
runs-on: ubuntu-latest
steps:
- name: github context
run: echo '${{ toJSON(github) }}'
- name: check github context
run: |
echo ${{ github.repository }}
echo ${{ github.event_name }}
20 changes: 20 additions & 0 deletions .github/workflows/part2/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: environment
on: push

jobs:
get-env:
runs-on: ubuntu-latest
steps:
- name: check env & secret
run: |
echo ${{ vars.level }}
echo ${{ secrets.key }}

get-env-dev:
runs-on: ubuntu-latest
environment: dev
steps:
- name: check env & secret
run: |
echo ${{ vars.level }}
echo ${{ secrets.key }}
28 changes: 28 additions & 0 deletions .github/workflows/part2/if-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: if-1
on:
push:
workflow_dispatch:

jobs:
job1:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: get event name
run: echo ${{ github.event_name }}
job2:
runs-on: ubuntu-latest
if: github.event_name != 'push'
steps:
- name: get event name
run: echo ${{ github.event_name }}
job3:
runs-on: ubuntu-latest
steps:
- name: get event name
if: github.event_name == 'push'
run: echo "PUSH"
- name: get event name
if: github.event_name != 'push'
run: echo "WORKFLOW_DISPATCH"

20 changes: 20 additions & 0 deletions .github/workflows/part2/if-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: if-2
on: push

jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: exit 1
run: exit 1
- name: echo
if: always()
run: echo hello

job2:
needs: [job1]
runs-on: ubuntu-latest
if: always()
steps:
- name: echo
run: echo hello
15 changes: 15 additions & 0 deletions .github/workflows/part2/matrix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: matrix
on: push

jobs:
get-matrix:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
version: [12,14]
runs-on: ${{ matrix.os }}
steps:
- name: check matrix
run: |
echo ${{ matrix.os }}
echo ${{ matrix.version }}
Loading