From b805afca813e3a2214180fce341ba623e06b3977 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sun, 17 Nov 2024 18:17:59 +0900 Subject: [PATCH 001/104] Add push.yaml --- .github/workflows/push.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/push.yaml diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 000000000..e69de29bb From 293420ff6ee5d9d1a03aecf481cd91ea264b6d91 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sun, 17 Nov 2024 18:19:43 +0900 Subject: [PATCH 002/104] Add push.yaml --- .github/workflows/push.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index e69de29bb..8c9a1038a 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -0,0 +1,9 @@ +name: push-workflow +on: push #push 이벤트가 발생할 때 workflow 실행 + +job: + push-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo "hello world" \ No newline at end of file From 145792dd10e99f524c0db18b45749508dc4bf39e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sun, 17 Nov 2024 18:23:58 +0900 Subject: [PATCH 003/104] Add push.yaml2 --- .github/workflows/push.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 8c9a1038a..01627f89f 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -1,9 +1,9 @@ -name: push-workflow -on: push #push 이벤트가 발생할 때 workflow 실행 + name: push-workflow + on: push #push 이벤트가 발생할 때 workflow 실행 -job: - push-job: - runs-on: ubuntu-latest - steps: - - name: step1 - run: echo "hello world" \ No newline at end of file + job: + push-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo "hello world" \ No newline at end of file From d8b692183a1ae0be48bad750e153d9860c0a461f Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sun, 17 Nov 2024 18:26:53 +0900 Subject: [PATCH 004/104] Add push.yaml3 --- .github/workflows/push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 01627f89f..1e3a1f719 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -1,7 +1,7 @@ name: push-workflow on: push #push 이벤트가 발생할 때 workflow 실행 - job: + jobs: push-job: runs-on: ubuntu-latest steps: From 1fd273fe666732fa2e56f0a7d8eb1c7dd5a3e69e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sun, 17 Nov 2024 18:29:56 +0900 Subject: [PATCH 005/104] Add push.yaml3 --- .github/workflows/push.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 1e3a1f719..7421e40ca 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -6,4 +6,8 @@ runs-on: ubuntu-latest steps: - name: step1 - run: echo "hello world" \ No newline at end of file + run: echo "hello world" + - name: step2 + run: | + echo "hello world2" + echo "hello world3" \ No newline at end of file From aaebb3fce2109db62fb5f22b3d885387221f582e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sun, 17 Nov 2024 18:32:14 +0900 Subject: [PATCH 006/104] Add push.yaml3 --- .github/workflows/{ => part1}/push.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ => part1}/push.yaml (100%) diff --git a/.github/workflows/push.yaml b/.github/workflows/part1/push.yaml similarity index 100% rename from .github/workflows/push.yaml rename to .github/workflows/part1/push.yaml From 0ada043b2f3846de247a96ed07317af1dd8b2ea0 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 27 Feb 2025 15:16:58 +0900 Subject: [PATCH 007/104] =?UTF-8?q?add=20=EC=A3=BC=EC=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/part1/push.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/part1/push.yaml b/.github/workflows/part1/push.yaml index 7421e40ca..6de08344a 100644 --- a/.github/workflows/part1/push.yaml +++ b/.github/workflows/part1/push.yaml @@ -1,12 +1,12 @@ name: push-workflow on: push #push 이벤트가 발생할 때 workflow 실행 - jobs: + jobs: # 잡 필수 push-job: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # 실행 환경 steps: - - name: step1 - run: echo "hello world" + - name: step1 # 단계 이름 + run: echo "hello world" # 실행할 명령어 - name: step2 run: | echo "hello world2" From b15cfc0d5bf5ea89e778f4bb1ce3a3f53ed4278f Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 10:22:38 +0900 Subject: [PATCH 008/104] add pull_r --- .github/workflows/part1/push.yaml | 2 +- .github/workflows/pull_request.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pull_request.yaml diff --git a/.github/workflows/part1/push.yaml b/.github/workflows/part1/push.yaml index 6de08344a..ab63f019a 100644 --- a/.github/workflows/part1/push.yaml +++ b/.github/workflows/part1/push.yaml @@ -8,6 +8,6 @@ - name: step1 # 단계 이름 run: echo "hello world" # 실행할 명령어 - name: step2 - run: | + run: | # 여러 줄의 명령어 실행 echo "hello world2" echo "hello world3" \ No newline at end of file diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml new file mode 100644 index 000000000..a4dbdd9c2 --- /dev/null +++ b/.github/workflows/pull_request.yaml @@ -0,0 +1,13 @@ +name: pull_request-workflow +on: pull_request # pull_request 이벤트가 발생할 때 workflow 실행 + +jobs: + push-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo "hello world" + - name: step2 + run: | + echo "hello world2" + echo "hello world3" \ No newline at end of file From 1c95c0b1fc9e2b1cfdb5d651fc1288da3c38639e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 10:38:07 +0900 Subject: [PATCH 009/104] add pull_r2 --- .github/workflows/pull_request.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index a4dbdd9c2..9875bb9e0 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -1,6 +1,8 @@ name: pull_request-workflow -on: pull_request # pull_request 이벤트가 발생할 때 workflow 실행 - +on: + pull_request: + #types: [opened, synchronize] # pull_request가 열리거나 업데이트 될 때 workflow 실행 + types: [opened] # pull_request가 열릴 때만 workflow 실행 jobs: push-job: runs-on: ubuntu-latest From f4c9ec3afe5b62fc67c6b5acbbd50d66d655e025 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 10:49:25 +0900 Subject: [PATCH 010/104] add issue.yml --- .github/workflows/issue.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/issue.yml diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml new file mode 100644 index 000000000..aa2e70a5d --- /dev/null +++ b/.github/workflows/issue.yml @@ -0,0 +1,15 @@ +name: issue-workflow +on: + issues: + types: [opened] # issue가 열릴 때만 workflow 실행 + +jobs: + issue-job: #이슈가 트리거 되면 작동 + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo "hello world" + - name: step2 + run: | + echo "hello world2" + echo "hello world3" \ No newline at end of file From 4a62517fbde0972095807e0e2b76f2a46af32752 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 11:01:23 +0900 Subject: [PATCH 011/104] add issue_comment.yaml --- .github/workflows/issue_comment.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/issue_comment.yml diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml new file mode 100644 index 000000000..168286f1d --- /dev/null +++ b/.github/workflows/issue_comment.yml @@ -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}} \ No newline at end of file From e856be8c422210d05b601674823bafc88fb3f2a2 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 11:39:48 +0900 Subject: [PATCH 012/104] add workflow_dispatch --- .github/workflows/{ => part1}/issue.yml | 0 .../workflows/{ => part1}/issue_comment.yml | 0 .../workflows/{ => part1}/pull_request.yaml | 0 .github/workflows/workflow_dispatch.yml | 32 +++++++++++++++++++ 4 files changed, 32 insertions(+) rename .github/workflows/{ => part1}/issue.yml (100%) rename .github/workflows/{ => part1}/issue_comment.yml (100%) rename .github/workflows/{ => part1}/pull_request.yaml (100%) create mode 100644 .github/workflows/workflow_dispatch.yml diff --git a/.github/workflows/issue.yml b/.github/workflows/part1/issue.yml similarity index 100% rename from .github/workflows/issue.yml rename to .github/workflows/part1/issue.yml diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/part1/issue_comment.yml similarity index 100% rename from .github/workflows/issue_comment.yml rename to .github/workflows/part1/issue_comment.yml diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/part1/pull_request.yaml similarity index 100% rename from .github/workflows/pull_request.yaml rename to .github/workflows/part1/pull_request.yaml diff --git a/.github/workflows/workflow_dispatch.yml b/.github/workflows/workflow_dispatch.yml new file mode 100644 index 000000000..25e33fed2 --- /dev/null +++ b/.github/workflows/workflow_dispatch.yml @@ -0,0 +1,32 @@ +name: workflow_dispatch-workflow +on: + workflow_dispatch: + inputs: + name: + description: 'set name' + required: true # 필수냐? + default: github-actions' + environment: + description: 'set env' + required: true + default: 'dev' + type: choice + options: + - dev + - prod + - qa + +jobs: + workflow_dispatch-job: + runs-on: ubuntu-latest + steps: + - name: step1 + run: echo "hello world" + - name: step2 + run: | + echo "hello world2" + echo "hello world3" + - name: echo inputs + run: | + echo ${{ github.event.inputs.name }} + echo ${{ github.event.inputs.environment }} \ No newline at end of file From 7526e8f51d5f60f44346862660f7c36ec19b9be3 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 11:43:56 +0900 Subject: [PATCH 013/104] add workflow_dispatch --- .github/workflows/workflow_dispatch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow_dispatch.yml b/.github/workflows/workflow_dispatch.yml index 25e33fed2..68136868e 100644 --- a/.github/workflows/workflow_dispatch.yml +++ b/.github/workflows/workflow_dispatch.yml @@ -28,5 +28,5 @@ jobs: echo "hello world3" - name: echo inputs run: | - echo ${{ github.event.inputs.name }} - echo ${{ github.event.inputs.environment }} \ No newline at end of file + echo ${{ inputs.name }} + echo ${{ inputs.environment }} \ No newline at end of file From edc270bf3bc602533d79a0a3b3c414c62b9752ef Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 11:45:53 +0900 Subject: [PATCH 014/104] add workflow_dispatch --- .github/workflows/workflow_dispatch.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow_dispatch.yml b/.github/workflows/workflow_dispatch.yml index 68136868e..a76c9d9a5 100644 --- a/.github/workflows/workflow_dispatch.yml +++ b/.github/workflows/workflow_dispatch.yml @@ -6,15 +6,16 @@ on: description: 'set name' required: true # 필수냐? default: github-actions' + type: string environment: description: 'set env' required: true default: 'dev' type: choice options: - - dev - - prod - - qa + - dev + - prod + - qa jobs: workflow_dispatch-job: From 5a40fe9405e6e0723c6cced26abefedf67671526 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 11:47:08 +0900 Subject: [PATCH 015/104] add workflow_dispatch --- .github/workflows/workflow_dispatch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow_dispatch.yml b/.github/workflows/workflow_dispatch.yml index a76c9d9a5..5cfe1f59a 100644 --- a/.github/workflows/workflow_dispatch.yml +++ b/.github/workflows/workflow_dispatch.yml @@ -5,7 +5,7 @@ on: name: description: 'set name' required: true # 필수냐? - default: github-actions' + default: 'github-actions' type: string environment: description: 'set env' From de0e2ea777412e8d3c998852de8b38d9500807d0 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 16:49:17 +0900 Subject: [PATCH 016/104] add multi --- .github/workflows/mutiple_event.yml | 18 ++++++++++++++++++ .../{ => part1}/workflow_dispatch.yml | 0 2 files changed, 18 insertions(+) create mode 100644 .github/workflows/mutiple_event.yml rename .github/workflows/{ => part1}/workflow_dispatch.yml (100%) diff --git a/.github/workflows/mutiple_event.yml b/.github/workflows/mutiple_event.yml new file mode 100644 index 000000000..eae071f7e --- /dev/null +++ b/.github/workflows/mutiple_event.yml @@ -0,0 +1,18 @@ +name: mulitple-event-workflow +on: + push: + issues: + types: [opened] + # 푸쉬, 이슈,수동 트리거에서도 작동 + workflow_dispatch: + +jobs: + mulitple-event-job: + runs-on: ubuntu-latest + steps: + - name: mulitple event + run: echo "hello world" + - name: step2 + run: | + echo hello world + echo gihub action \ No newline at end of file diff --git a/.github/workflows/workflow_dispatch.yml b/.github/workflows/part1/workflow_dispatch.yml similarity index 100% rename from .github/workflows/workflow_dispatch.yml rename to .github/workflows/part1/workflow_dispatch.yml From 258e4a9d8f81b110b800f52bafe4ae7fa3c24030 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 17:04:08 +0900 Subject: [PATCH 017/104] add needs --- .github/workflows/needs.yml | 30 +++++++++++++++++++ .../workflows/{ => part1}/mutiple_event.yml | 0 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/needs.yml rename .github/workflows/{ => part1}/mutiple_event.yml (100%) diff --git a/.github/workflows/needs.yml b/.github/workflows/needs.yml new file mode 100644 index 000000000..60707fe3c --- /dev/null +++ b/.github/workflows/needs.yml @@ -0,0 +1,30 @@ +name: needs +on: push + +jobs: + job1: + runs-on: ubuntu-latest + steps: + - name: job1 + run: echo "job1" + + job2: + runs-on: ubuntu-latest + needs: [job1] # 종속성 설정 + steps: + - name: job2 + run: echo "job2" + + job3: + runs-on: ubuntu-latest + steps: + - name: job3 # 동시에 실행 + run: | + echo "job3 failed" + exit 1 + job4: + runs-on: ubuntu-latest + needs: [job3] # 종속성 설정 job3이 실패하면 실행 안됨 + steps: + - name: job4 + run: echo "job4" diff --git a/.github/workflows/mutiple_event.yml b/.github/workflows/part1/mutiple_event.yml similarity index 100% rename from .github/workflows/mutiple_event.yml rename to .github/workflows/part1/mutiple_event.yml From 6254fc0db51efeb66bd42f0c115efce79933bff2 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 17:13:01 +0900 Subject: [PATCH 018/104] add rerun --- .github/workflows/{ => part1}/needs.yml | 0 .github/workflows/re-run.yml | 13 +++++++++++++ 2 files changed, 13 insertions(+) rename .github/workflows/{ => part1}/needs.yml (100%) create mode 100644 .github/workflows/re-run.yml diff --git a/.github/workflows/needs.yml b/.github/workflows/part1/needs.yml similarity index 100% rename from .github/workflows/needs.yml rename to .github/workflows/part1/needs.yml diff --git a/.github/workflows/re-run.yml b/.github/workflows/re-run.yml new file mode 100644 index 000000000..901dc29a1 --- /dev/null +++ b/.github/workflows/re-run.yml @@ -0,0 +1,13 @@ +name: re-run +on: push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: test + run: echo "test" + - name: test2 + run: | + echo "test2" + echo "test3" \ No newline at end of file From 7de4fd85c6a272400656cf6bbdf0628ade6e90a0 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 17:14:27 +0900 Subject: [PATCH 019/104] add rerun --- .github/workflows/re-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/re-run.yml b/.github/workflows/re-run.yml index 901dc29a1..1340c612c 100644 --- a/.github/workflows/re-run.yml +++ b/.github/workflows/re-run.yml @@ -10,4 +10,4 @@ jobs: - name: test2 run: | echo "test2" - echo "test3" \ No newline at end of file + cat README.md \ No newline at end of file From 0add6e218ff7ef96231a5fc3397d59e2199e5a40 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 28 Feb 2025 17:16:35 +0900 Subject: [PATCH 020/104] add rerun --- .github/workflows/re-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/re-run.yml b/.github/workflows/re-run.yml index 1340c612c..3500bdc89 100644 --- a/.github/workflows/re-run.yml +++ b/.github/workflows/re-run.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: test - run: echo "test" + uses: actions/checkout@v4 # checkout 액션 사용 - name: test2 run: | echo "test2" From f5a29c1dc26bd1ab5aa7cd4c06e50b3ea9a2700d Mon Sep 17 00:00:00 2001 From: r2d2c2 <64571095+r2d2c2@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:17:35 +0900 Subject: [PATCH 021/104] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea85d664a..f794ef38f 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# github-actions-setting \ No newline at end of file +# github-actions-setting 1 From 19607a483fbf2c87d51abf55d8339f18e053d1d1 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 5 Mar 2025 13:37:13 +0900 Subject: [PATCH 022/104] add checkout.yml --- .github/workflows/checkout.yml | 20 ++++++++++++++++++++ .github/workflows/{ => part1}/re-run.yml | 0 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/checkout.yml rename .github/workflows/{ => part1}/re-run.yml (100%) diff --git a/.github/workflows/checkout.yml b/.github/workflows/checkout.yml new file mode 100644 index 000000000..b015b656d --- /dev/null +++ b/.github/workflows/checkout.yml @@ -0,0 +1,20 @@ +name: checkout +on: workflow_dispatch + +jobs: + no-checkout: + runs-on: ubuntu-latest + steps: + - name: no-checkout + run: | + echo "no-checkout" + cat README.md + checkout: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 # checkout 액션 사용 + - name: checkout2 + run: | + echo "checkout2" + cat README.md \ No newline at end of file diff --git a/.github/workflows/re-run.yml b/.github/workflows/part1/re-run.yml similarity index 100% rename from .github/workflows/re-run.yml rename to .github/workflows/part1/re-run.yml From a09f1d5e653b4d476b75f3b326abace6795b7e0c Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 5 Mar 2025 13:51:34 +0900 Subject: [PATCH 023/104] add context --- .github/workflows/context.yml | 9 +++++++++ .github/workflows/{ => part2}/checkout.yml | 0 2 files changed, 9 insertions(+) create mode 100644 .github/workflows/context.yml rename .github/workflows/{ => part2}/checkout.yml (100%) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml new file mode 100644 index 000000000..d8cc384b1 --- /dev/null +++ b/.github/workflows/context.yml @@ -0,0 +1,9 @@ +name: context +on: workflow_dispatch + +jobs: + context: + runs-on: ubuntu-latest + steps: + - name: github context + run: echo '${{toJSON(github)}}' \ No newline at end of file diff --git a/.github/workflows/checkout.yml b/.github/workflows/part2/checkout.yml similarity index 100% rename from .github/workflows/checkout.yml rename to .github/workflows/part2/checkout.yml From b3685a0fda91c6d400c5684db0da56e67d971721 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 5 Mar 2025 13:56:18 +0900 Subject: [PATCH 024/104] update context.yml --- .github/workflows/context.yml | 7 ++++++- .github/workflows/part2/checkout.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/context.yml b/.github/workflows/context.yml index d8cc384b1..bd298f4fb 100644 --- a/.github/workflows/context.yml +++ b/.github/workflows/context.yml @@ -6,4 +6,9 @@ jobs: runs-on: ubuntu-latest steps: - name: github context - run: echo '${{toJSON(github)}}' \ No newline at end of file + run: echo '${{toJSON(github)}}' + # 내 github 내용을 josn으로 변환하여 출력 + - name: check github context + run: | + echo ${{github.repository}} # github 레포지토리 정보 출력 + echo ${{github.event_name}} # github 이벤트 이름 출력 \ No newline at end of file diff --git a/.github/workflows/part2/checkout.yml b/.github/workflows/part2/checkout.yml index b015b656d..4e871aa4c 100644 --- a/.github/workflows/part2/checkout.yml +++ b/.github/workflows/part2/checkout.yml @@ -2,19 +2,19 @@ name: checkout on: workflow_dispatch jobs: - no-checkout: + no-checkout: # github 레포지토리를 가지고 오지 않고 사용 runs-on: ubuntu-latest steps: - - name: no-checkout + - name: no-checkout # run 에러(README.md 파일이 없음) run: | - echo "no-checkout" - cat README.md - checkout: + echo "no-checkout" + cat README.md + checkout: # github 레포지토리를 가지고 와서 사용 runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v4 # checkout 액션 사용 - - name: checkout2 + - name: checkout2 # checkout 액션을 사용하여 README.md 파일을 가지고 와서 사용 run: | echo "checkout2" cat README.md \ No newline at end of file From 741c96f3c07080c0d662ba760c67225b177183b5 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 5 Mar 2025 14:03:49 +0900 Subject: [PATCH 025/104] add branch_filter.yml --- .github/workflows/branch_filter.yml | 11 +++++++++++ .github/workflows/{ => part2}/context.yml | 0 2 files changed, 11 insertions(+) create mode 100644 .github/workflows/branch_filter.yml rename .github/workflows/{ => part2}/context.yml (100%) diff --git a/.github/workflows/branch_filter.yml b/.github/workflows/branch_filter.yml new file mode 100644 index 000000000..bd3ea7c54 --- /dev/null +++ b/.github/workflows/branch_filter.yml @@ -0,0 +1,11 @@ +name: branch-filter +on: + push: # push 이벤트 발생 시 + branches: ["dev"] # dev 브래치에만 적용 + +jobs: + branch-filter: + runs-on: ubuntu-latest + steps: + - name: branch-filter + run: echo "branch-filter" \ No newline at end of file diff --git a/.github/workflows/context.yml b/.github/workflows/part2/context.yml similarity index 100% rename from .github/workflows/context.yml rename to .github/workflows/part2/context.yml From cf4fb595f161b8b2af90f287c57cd7fa5c83bc15 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:11:50 +0900 Subject: [PATCH 026/104] add path_filter.yml --- .github/workflows/{ => part2}/branch_filter.yml | 0 .github/workflows/path_filter.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+) rename .github/workflows/{ => part2}/branch_filter.yml (100%) create mode 100644 .github/workflows/path_filter.yml diff --git a/.github/workflows/branch_filter.yml b/.github/workflows/part2/branch_filter.yml similarity index 100% rename from .github/workflows/branch_filter.yml rename to .github/workflows/part2/branch_filter.yml diff --git a/.github/workflows/path_filter.yml b/.github/workflows/path_filter.yml new file mode 100644 index 000000000..aac97d58a --- /dev/null +++ b/.github/workflows/path_filter.yml @@ -0,0 +1,12 @@ +name: path-filter +on: + push: + paths: # 특정 파일이 변경되었을 때만 workflow 실행 + - .github/workflows/part1/* # .github/workflows/part1/ 디렉토리 내 파일이 변경되었을 때 + +jobs: + path-filter: + runs-on: ubuntu-latest + steps: + - name: path-filter + run: echo "path-filter" \ No newline at end of file From 6548d8567430ee29647a98a7ac2fc92a25297d93 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:16:16 +0900 Subject: [PATCH 027/104] update part1 --- .github/workflows/part1/workflow_dispatch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/part1/workflow_dispatch.yml b/.github/workflows/part1/workflow_dispatch.yml index 5cfe1f59a..3ac594e25 100644 --- a/.github/workflows/part1/workflow_dispatch.yml +++ b/.github/workflows/part1/workflow_dispatch.yml @@ -29,5 +29,5 @@ jobs: echo "hello world3" - name: echo inputs run: | - echo ${{ inputs.name }} - echo ${{ inputs.environment }} \ No newline at end of file + echo ${{ inputs.name }} # 입력받은 name 출력 + echo ${{ inputs.environment }} # 입력받은 environment 출력 \ No newline at end of file From edfd41dec8edf8131f5c687bf47234bc97694198 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:24:43 +0900 Subject: [PATCH 028/104] update path_filter --- .github/workflows/path_filter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/path_filter.yml b/.github/workflows/path_filter.yml index aac97d58a..e4366c99c 100644 --- a/.github/workflows/path_filter.yml +++ b/.github/workflows/path_filter.yml @@ -3,6 +3,7 @@ on: push: paths: # 특정 파일이 변경되었을 때만 workflow 실행 - .github/workflows/part1/* # .github/workflows/part1/ 디렉토리 내 파일이 변경되었을 때 + - !.github/workflows/part1/push.yml # .github/workflows/part1/push.yml은 제외 jobs: path-filter: From c194eaa3eb4ef6b365e6629d06395814e8d3d508 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:26:25 +0900 Subject: [PATCH 029/104] update path_filter --- .github/workflows/path_filter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/path_filter.yml b/.github/workflows/path_filter.yml index e4366c99c..b78ff9b8e 100644 --- a/.github/workflows/path_filter.yml +++ b/.github/workflows/path_filter.yml @@ -3,7 +3,7 @@ on: push: paths: # 특정 파일이 변경되었을 때만 workflow 실행 - .github/workflows/part1/* # .github/workflows/part1/ 디렉토리 내 파일이 변경되었을 때 - - !.github/workflows/part1/push.yml # .github/workflows/part1/push.yml은 제외 + - !.github/workflows/part1/push.yaml # .github/workflows/part1/push.yml은 제외 jobs: path-filter: From 6ec0855b5cbfa930cc2be09872c36e52ec0f26d3 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:27:48 +0900 Subject: [PATCH 030/104] update push.yaml --- .github/workflows/part1/push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/part1/push.yaml b/.github/workflows/part1/push.yaml index ab63f019a..32090bab1 100644 --- a/.github/workflows/part1/push.yaml +++ b/.github/workflows/part1/push.yaml @@ -7,7 +7,7 @@ steps: - name: step1 # 단계 이름 run: echo "hello world" # 실행할 명령어 - - name: step2 + - name: step2 # 단계 이름 run: | # 여러 줄의 명령어 실행 echo "hello world2" - echo "hello world3" \ No newline at end of file + echo "hello world3" \ No newline at end of file From 9282db0e0eb05c457e20062cc78928a94d636bac Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:31:39 +0900 Subject: [PATCH 031/104] update path update --- .github/workflows/path_filter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/path_filter.yml b/.github/workflows/path_filter.yml index b78ff9b8e..26afafb17 100644 --- a/.github/workflows/path_filter.yml +++ b/.github/workflows/path_filter.yml @@ -2,8 +2,8 @@ name: path-filter on: push: paths: # 특정 파일이 변경되었을 때만 workflow 실행 - - .github/workflows/part1/* # .github/workflows/part1/ 디렉토리 내 파일이 변경되었을 때 - - !.github/workflows/part1/push.yaml # .github/workflows/part1/push.yml은 제외 + - '.github/workflows/part1/*' # .github/workflows/part1/ 디렉토리 내 파일이 변경되었을 때 + - '!.github/workflows/part1/push.yaml' # .github/workflows/part1/push.yml은 제외 jobs: path-filter: From 686ed406f2cfd411fef775b084737ee3b10decb1 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 11:33:23 +0900 Subject: [PATCH 032/104] update push update --- .github/workflows/part1/push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/part1/push.yaml b/.github/workflows/part1/push.yaml index 32090bab1..689ac3f26 100644 --- a/.github/workflows/part1/push.yaml +++ b/.github/workflows/part1/push.yaml @@ -1,8 +1,8 @@ name: push-workflow on: push #push 이벤트가 발생할 때 workflow 실행 - jobs: # 잡 필수 - push-job: + jobs: # 잡 필수(하나 이상 필요) + push-job: runs-on: ubuntu-latest # 실행 환경 steps: - name: step1 # 단계 이름 From 1f0084d159d36e5b166b253ad83a86eef181c82e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 13:27:51 +0900 Subject: [PATCH 033/104] add tag --- .github/workflows/{ => part2}/path_filter.yml | 0 .github/workflows/tag_filter.yml | 13 +++++++++++++ 2 files changed, 13 insertions(+) rename .github/workflows/{ => part2}/path_filter.yml (100%) create mode 100644 .github/workflows/tag_filter.yml diff --git a/.github/workflows/path_filter.yml b/.github/workflows/part2/path_filter.yml similarity index 100% rename from .github/workflows/path_filter.yml rename to .github/workflows/part2/path_filter.yml diff --git a/.github/workflows/tag_filter.yml b/.github/workflows/tag_filter.yml new file mode 100644 index 000000000..ee86d3075 --- /dev/null +++ b/.github/workflows/tag_filter.yml @@ -0,0 +1,13 @@ +name: tag-filter +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' # v로 시작하고 0-9 사이의 숫자가 3개인 태그가 push될 때만 workflow 실행 + #v1.0.0, v2.0.0, v3.0.0, ...(1, 1.0은 트리거 되지 않음) + +jobs: + tag-filter: + runs-on: ubuntu-latest + steps: + - name: tag-filter + run: echo "tag-filter" From f3e4ca995f32dce0f9831357aa1a5dcc6273ede6 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 14:25:15 +0900 Subject: [PATCH 034/104] add timeout --- .github/workflows/{ => part2}/tag_filter.yml | 0 .github/workflows/part2/timeout.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) rename .github/workflows/{ => part2}/tag_filter.yml (100%) create mode 100644 .github/workflows/part2/timeout.yml diff --git a/.github/workflows/tag_filter.yml b/.github/workflows/part2/tag_filter.yml similarity index 100% rename from .github/workflows/tag_filter.yml rename to .github/workflows/part2/tag_filter.yml diff --git a/.github/workflows/part2/timeout.yml b/.github/workflows/part2/timeout.yml new file mode 100644 index 000000000..846903bb1 --- /dev/null +++ b/.github/workflows/part2/timeout.yml @@ -0,0 +1,18 @@ +name: timeout +on: push + +jobs: + timeout: + runs-no: ubuntu-latest + timeout-minutes: 2 # 2분 후에 workflow 종료 + steps: + - name: loop + run: | + count=0 + while true; do + echo "count: $count" + count=$(($count+1)) + sleep 10 + done + - name: echo + run: echo "hello world" \ No newline at end of file From 68f18d1b104a735d2a045fd9ecaa9bb2010864a3 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 14:27:35 +0900 Subject: [PATCH 035/104] add timeout --- .github/workflows/{part2 => }/timeout.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{part2 => }/timeout.yml (100%) diff --git a/.github/workflows/part2/timeout.yml b/.github/workflows/timeout.yml similarity index 100% rename from .github/workflows/part2/timeout.yml rename to .github/workflows/timeout.yml From 1ebaeba07d4c5f6ef02d36ab24e4a288d4d889b4 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 14:28:23 +0900 Subject: [PATCH 036/104] add timeout --- .github/workflows/timeout.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/timeout.yml b/.github/workflows/timeout.yml index 846903bb1..30f3f644f 100644 --- a/.github/workflows/timeout.yml +++ b/.github/workflows/timeout.yml @@ -7,7 +7,7 @@ jobs: timeout-minutes: 2 # 2분 후에 workflow 종료 steps: - name: loop - run: | + run: | count=0 while true; do echo "count: $count" @@ -15,4 +15,4 @@ jobs: sleep 10 done - name: echo - run: echo "hello world" \ No newline at end of file + run: echo "hello world" \ No newline at end of file From 5f390b05aee2a1faddde83d48eff77c9ed8118ba Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 14:30:25 +0900 Subject: [PATCH 037/104] add timeout --- .github/workflows/timeout.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/timeout.yml b/.github/workflows/timeout.yml index 30f3f644f..d04bbb246 100644 --- a/.github/workflows/timeout.yml +++ b/.github/workflows/timeout.yml @@ -3,7 +3,7 @@ on: push jobs: timeout: - runs-no: ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 2 # 2분 후에 workflow 종료 steps: - name: loop From 8bd8cb91efc0f542e92920335c4590c127ec313e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:22:05 +0900 Subject: [PATCH 038/104] add timeout update --- .github/workflows/timeout.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/timeout.yml b/.github/workflows/timeout.yml index d04bbb246..bd3c9159c 100644 --- a/.github/workflows/timeout.yml +++ b/.github/workflows/timeout.yml @@ -14,5 +14,6 @@ jobs: count=$(($count+1)) sleep 10 done + timeout-minutes: 1 # 1분 후에 step 종료 - name: echo run: echo "hello world" \ No newline at end of file From b4a861181cc171ca029c42e0b4d075c55d08efe9 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:37:23 +0900 Subject: [PATCH 039/104] add cacha.yml --- .github/workflows/cacha.yml | 33 +++++++++++++++++++++++ .github/workflows/{ => part2}/timeout.yml | 0 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/cacha.yml rename .github/workflows/{ => part2}/timeout.yml (100%) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml new file mode 100644 index 000000000..9b0c39468 --- /dev/null +++ b/.github/workflows/cacha.yml @@ -0,0 +1,33 @@ +name: cache +on: + push: + paths: + - 'myapp/**' # myapp 디렉토리 내 파일이 변경되었을 때만 workflow 실행 + +jobs: + cache: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: setup-node + uses: actions/cache@v3 + with: + node-version: 18 + - name: Cache node.js modules + uses: actions/cache@3 + with: + path: ~/.npm # npm 패키지 캐시 경로 + key: ${{runner.os}}-node-${{hashFiles('**/package-lock.json')}} + # {{사용할 os}}-node-{{package-lock.json 파일의 해시값}}으로 키 생성 + restore-keys: | + ${{runner.os}}-node- + - name: Install dependencies + run: | + cd my-app + nmp ci + - name: npm build + run: | + cd my-app + nmp run build + \ No newline at end of file diff --git a/.github/workflows/timeout.yml b/.github/workflows/part2/timeout.yml similarity index 100% rename from .github/workflows/timeout.yml rename to .github/workflows/part2/timeout.yml From 21c46f10cff75cb2c186df93752ea08a42b2a704 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:39:27 +0900 Subject: [PATCH 040/104] add cacha.yml --- .github/workflows/cacha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index 9b0c39468..789622799 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -15,7 +15,7 @@ jobs: with: node-version: 18 - name: Cache node.js modules - uses: actions/cache@3 + uses: actions/cache@v3 with: path: ~/.npm # npm 패키지 캐시 경로 key: ${{runner.os}}-node-${{hashFiles('**/package-lock.json')}} From 0abb74dd4b31749ada2096433b9b14dac19f66bd Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:40:30 +0900 Subject: [PATCH 041/104] add cacha.yml --- .github/workflows/cacha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index 789622799..dd5720cce 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -2,7 +2,7 @@ name: cache on: push: paths: - - 'myapp/**' # myapp 디렉토리 내 파일이 변경되었을 때만 workflow 실행 + - 'my-app/**' # myapp 디렉토리 내 파일이 변경되었을 때만 workflow 실행 jobs: cache: From bcff1d115e2711523b39469de3c4201f76bb2705 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:43:31 +0900 Subject: [PATCH 042/104] add cacha.yml --- .github/workflows/cacha.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index dd5720cce..400cdc025 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -11,23 +11,22 @@ jobs: - name: checkout uses: actions/checkout@v4 - name: setup-node - uses: actions/cache@v3 + uses: actions/setup-node@v3 with: node-version: 18 - name: Cache node.js modules uses: actions/cache@v3 with: path: ~/.npm # npm 패키지 캐시 경로 - key: ${{runner.os}}-node-${{hashFiles('**/package-lock.json')}} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} # {{사용할 os}}-node-{{package-lock.json 파일의 해시값}}으로 키 생성 restore-keys: | - ${{runner.os}}-node- - - name: Install dependencies - run: | - cd my-app - nmp ci - - name: npm build - run: | - cd my-app - nmp run build - \ No newline at end of file + ${{ runner.os }}-node- + - name: Install dependencies + run: | + cd my-app + npm ci + - name: npm build + run: | + cd my-app + npm run build \ No newline at end of file From 3bd3f37042b2ad1a5bd5cdd514e51acaef6dfbdf Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:47:30 +0900 Subject: [PATCH 043/104] add cacha.yml --- .github/workflows/cacha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index 400cdc025..adf5325a6 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: setup-node uses: actions/setup-node@v3 with: From 38d5c8d0c304a7fad13a110064eca53afe600d5a Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:49:39 +0900 Subject: [PATCH 044/104] my cacha.yml --- .github/workflows/cacha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index adf5325a6..4d107dde8 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -1,4 +1,4 @@ -name: cache +name: cache1 on: push: paths: From 5d4d6fe97084e4570463395fd0a9d534dc662d35 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:52:47 +0900 Subject: [PATCH 045/104] my cacha.yml --- .github/workflows/cacha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index 4d107dde8..adf5325a6 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -1,4 +1,4 @@ -name: cache1 +name: cache on: push: paths: From 96f0f75b15c28d574fbb683cc9e0be384040acfc Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 15:54:09 +0900 Subject: [PATCH 046/104] my cacha.yml --- my-app/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/src/App.js b/my-app/src/App.js index 725bc9db5..4c5dac388 100644 --- a/my-app/src/App.js +++ b/my-app/src/App.js @@ -15,7 +15,7 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn GithubAction cicd + Learn GithubAction cicd 2 From 809acad302155dc2ca44d5bb10c2c21d01b03e3a Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:05:58 +0900 Subject: [PATCH 047/104] my cacha.yml --- .github/workflows/cacha.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cacha.yml b/.github/workflows/cacha.yml index adf5325a6..48fa98f52 100644 --- a/.github/workflows/cacha.yml +++ b/.github/workflows/cacha.yml @@ -9,13 +9,13 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2 # 깃허브에서 제공하는 체크아웃 액션 사용 - name: setup-node - uses: actions/setup-node@v3 + uses: actions/setup-node@v3 # 노드.js 설정 액션 사용 with: node-version: 18 - name: Cache node.js modules - uses: actions/cache@v3 + uses: actions/cache@v3 # 캐시 액션 사용 with: path: ~/.npm # npm 패키지 캐시 경로 key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} From 543c5a6f2bcb82e3c248cd1f8eaea87422a29490 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:23:47 +0900 Subject: [PATCH 048/104] add artifact.yml --- .github/workflows/artifact.yml | 25 +++++++++++++++++++++++++ .github/workflows/{ => part2}/cacha.yml | 0 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/artifact.yml rename .github/workflows/{ => part2}/cacha.yml (100%) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml new file mode 100644 index 000000000..cb420a02e --- /dev/null +++ b/.github/workflows/artifact.yml @@ -0,0 +1,25 @@ +name: artifact +on: push +jobs: + upload-artifact: + runs-on: ubuntu-latest + steps: + - name: echo + uses: echo hello-world > hello.txt + - name: upload artifact + uses: actions/upload-artifact@v3 # artifact 업로드 액션 사용 + with: + name: artifact-test + paths: ./hello.txt + + download-artifact: + needs: [upload-artifact] # upload-artifact 잡이 성공적으로 완료되어야만 실행 + runs-on: ubuntu-latest + steps: + - name: download artifact + uses: actions/download-artifact@v3 # artifact 다운로드 액션 사용 + with: + name: artifact-test + path: ./ # 현재 디렉토리에 다운로드 + - name: cat + run: cat hello.txt \ No newline at end of file diff --git a/.github/workflows/cacha.yml b/.github/workflows/part2/cacha.yml similarity index 100% rename from .github/workflows/cacha.yml rename to .github/workflows/part2/cacha.yml From 55b07ce28119bd4295c1476964169832a4354ea9 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:27:03 +0900 Subject: [PATCH 049/104] add artifact.yml --- .github/workflows/artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index cb420a02e..ae6f3168a 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest steps: - name: echo - uses: echo hello-world > hello.txt + run: echo hello-world > hello.txt - name: upload artifact uses: actions/upload-artifact@v3 # artifact 업로드 액션 사용 with: From 88c843d6bd5cc0ad3025d0f56fbb15d6f260cc3d Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:28:58 +0900 Subject: [PATCH 050/104] add artifact.yml --- .github/workflows/artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index ae6f3168a..3cfa7b0b2 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -10,7 +10,7 @@ jobs: uses: actions/upload-artifact@v3 # artifact 업로드 액션 사용 with: name: artifact-test - paths: ./hello.txt + path: ./hello.txt download-artifact: needs: [upload-artifact] # upload-artifact 잡이 성공적으로 완료되어야만 실행 From a96962256c434e4d2a956b916bac0805c2e591ab Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:29:58 +0900 Subject: [PATCH 051/104] add artifact.yml --- .github/workflows/artifact.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 3cfa7b0b2..238aad6a9 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -7,7 +7,7 @@ jobs: - name: echo run: echo hello-world > hello.txt - name: upload artifact - uses: actions/upload-artifact@v3 # artifact 업로드 액션 사용 + uses: actions/upload-artifact@v4 # artifact 업로드 액션 사용 with: name: artifact-test path: ./hello.txt @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: download artifact - uses: actions/download-artifact@v3 # artifact 다운로드 액션 사용 + uses: actions/download-artifact@v4 # artifact 다운로드 액션 사용 with: name: artifact-test path: ./ # 현재 디렉토리에 다운로드 From bb0076c30d5eef0ed967f16585b0c654b3090d5f Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:41:34 +0900 Subject: [PATCH 052/104] add ouput --- .github/workflows/{ => part2}/artifact.yml | 0 .github/workflows/test_output.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) rename .github/workflows/{ => part2}/artifact.yml (100%) create mode 100644 .github/workflows/test_output.yml diff --git a/.github/workflows/artifact.yml b/.github/workflows/part2/artifact.yml similarity index 100% rename from .github/workflows/artifact.yml rename to .github/workflows/part2/artifact.yml diff --git a/.github/workflows/test_output.yml b/.github/workflows/test_output.yml new file mode 100644 index 000000000..9eb345ef6 --- /dev/null +++ b/.github/workflows/test_output.yml @@ -0,0 +1,16 @@ +name: output +on: push +jobs: + output-job: + runs-on: ubuntu-latest + steps: + - name: echo + id: check1 + run: echo "test=hello" >> "$GITHUB_OUTPUT" + - name: output + id: check2 + run: echo "test=hello2" >> "$GITHUB_OUTPUT" + - name: check + run: | + echo ${{step.check1.outputs.test}} + echo ${{step.check2.outputs.test}} \ No newline at end of file From ba6457b1f781414aad46b14f96f8af8da29078ae Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 6 Mar 2025 17:43:04 +0900 Subject: [PATCH 053/104] add ouput --- .github/workflows/test_output.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_output.yml b/.github/workflows/test_output.yml index 9eb345ef6..7379321b3 100644 --- a/.github/workflows/test_output.yml +++ b/.github/workflows/test_output.yml @@ -12,5 +12,5 @@ jobs: run: echo "test=hello2" >> "$GITHUB_OUTPUT" - name: check run: | - echo ${{step.check1.outputs.test}} - echo ${{step.check2.outputs.test}} \ No newline at end of file + echo ${{ steps.check1.outputs.test }} + echo ${{ steps.check2.outputs.test }} \ No newline at end of file From db52823847c01e23bb7d8667e9b326ed5f2fc113 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 12:19:44 +0900 Subject: [PATCH 054/104] test_output2.yml --- .github/workflows/{ => part2}/test_output.yml | 0 .github/workflows/test_output2.yml | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+) rename .github/workflows/{ => part2}/test_output.yml (100%) create mode 100644 .github/workflows/test_output2.yml diff --git a/.github/workflows/test_output.yml b/.github/workflows/part2/test_output.yml similarity index 100% rename from .github/workflows/test_output.yml rename to .github/workflows/part2/test_output.yml diff --git a/.github/workflows/test_output2.yml b/.github/workflows/test_output2.yml new file mode 100644 index 000000000..4c98e781d --- /dev/null +++ b/.github/workflows/test_output2.yml @@ -0,0 +1,22 @@ +name: output +on: push +jobs: + create-output: + runs-on: ubuntu-latest + outputs: + test: ${{steps.check.outputs.test}} + steps: + - name: echo output + id: check + rut: | + echo "test=hello" >> "$GITHUB_OUTPUT" + - name: check2 + run: | + echo ${{ steps.check.outputs.test }} + + get-output: + needs: [create-output] # create-job이 성공적으로 완료되어야만 실행 + runs-on: ubuntu-latest + steps: + - name: get output + run: echo ${{needs.create-output.outputs.test}} \ No newline at end of file From aef9fb7e872aceaab095ccd3be72ec8ae3858641 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 12:25:45 +0900 Subject: [PATCH 055/104] test_output2.yml --- .github/workflows/test_output2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_output2.yml b/.github/workflows/test_output2.yml index 4c98e781d..b19f1abbe 100644 --- a/.github/workflows/test_output2.yml +++ b/.github/workflows/test_output2.yml @@ -1,9 +1,9 @@ -name: output +name: output2 on: push jobs: create-output: runs-on: ubuntu-latest - outputs: + outputs: # 잡 실행 결과를 다른 잡에 전달 test: ${{steps.check.outputs.test}} steps: - name: echo output From 687815b0d1979b3003de31faa1cf6e7bbf9d5edd Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 12:26:57 +0900 Subject: [PATCH 056/104] test_output2.yml --- .github/workflows/test_output2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_output2.yml b/.github/workflows/test_output2.yml index b19f1abbe..407d79102 100644 --- a/.github/workflows/test_output2.yml +++ b/.github/workflows/test_output2.yml @@ -9,10 +9,10 @@ jobs: - name: echo output id: check rut: | - echo "test=hello" >> "$GITHUB_OUTPUT" + echo "test=hello" >> "$GITHUB_OUTPUT" - name: check2 run: | - echo ${{ steps.check.outputs.test }} + echo ${{ steps.check.outputs.test }} get-output: needs: [create-output] # create-job이 성공적으로 완료되어야만 실행 From b8bcfa34ce311214434ecd700114c585700f02d0 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 12:30:33 +0900 Subject: [PATCH 057/104] test_output2.yml --- .github/workflows/test_output2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_output2.yml b/.github/workflows/test_output2.yml index 407d79102..3a98abb89 100644 --- a/.github/workflows/test_output2.yml +++ b/.github/workflows/test_output2.yml @@ -8,7 +8,7 @@ jobs: steps: - name: echo output id: check - rut: | + run: | echo "test=hello" >> "$GITHUB_OUTPUT" - name: check2 run: | From 43ace8db0ce6caa0b302bea5b0ba593e9b3ba325 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 13:03:31 +0900 Subject: [PATCH 058/104] add var-1.yml --- .../workflows/{ => part2}/test_output2.yml | 0 .github/workflows/var-1.yml | 34 +++++++++++++++++++ 2 files changed, 34 insertions(+) rename .github/workflows/{ => part2}/test_output2.yml (100%) create mode 100644 .github/workflows/var-1.yml diff --git a/.github/workflows/test_output2.yml b/.github/workflows/part2/test_output2.yml similarity index 100% rename from .github/workflows/test_output2.yml rename to .github/workflows/part2/test_output2.yml diff --git a/.github/workflows/var-1.yml b/.github/workflows/var-1.yml new file mode 100644 index 000000000..e1ece5136 --- /dev/null +++ b/.github/workflows/var-1.yml @@ -0,0 +1,34 @@ +name: var-1 +on: push + +env: + level: work +jobs: + get-env-1: + runs-on: ubuntu-latest + steps: + - name: get env + run: echo ${{ env.level }} + get-env-2: + runs-on: ubuntu-latest + env: + level: job + steps: + - name: check env + run: echo ${{ env.level }} + get-env-3: + runs-on: ubuntu-latest + env: + level: job + steps: + - name: check env + run: echo ${{ env.level }} + env: + level: step + get-env: + runs-on: ubuntu-latest + steps: + - name: check env + run: echo "level=job">> $GITHUB_ENV + - name: check env + run: echo "LEVEL ${{env.level}}" \ No newline at end of file From 5a3ba3f311f75c85200226affb09ebb0e0902d84 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 13:47:57 +0900 Subject: [PATCH 059/104] add var2.yml --- .github/workflows/{ => part2}/var-1.yml | 0 .github/workflows/var-2.yml | 9 +++++++++ 2 files changed, 9 insertions(+) rename .github/workflows/{ => part2}/var-1.yml (100%) create mode 100644 .github/workflows/var-2.yml diff --git a/.github/workflows/var-1.yml b/.github/workflows/part2/var-1.yml similarity index 100% rename from .github/workflows/var-1.yml rename to .github/workflows/part2/var-1.yml diff --git a/.github/workflows/var-2.yml b/.github/workflows/var-2.yml new file mode 100644 index 000000000..314cc5ad7 --- /dev/null +++ b/.github/workflows/var-2.yml @@ -0,0 +1,9 @@ +name: var-2 +on: push + +jobs: + get-ver: + runs-on: ubuntu-latest + steps: + - name: get var + run: echo ${{vars.level}} \ No newline at end of file From ded9253095b5fc2a328580a49540b1010248d068 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 13:59:39 +0900 Subject: [PATCH 060/104] add secrets.yml --- .github/workflows/{ => part2}/var-2.yml | 0 .github/workflows/secrets.yml | 8 ++++++++ 2 files changed, 8 insertions(+) rename .github/workflows/{ => part2}/var-2.yml (100%) create mode 100644 .github/workflows/secrets.yml diff --git a/.github/workflows/var-2.yml b/.github/workflows/part2/var-2.yml similarity index 100% rename from .github/workflows/var-2.yml rename to .github/workflows/part2/var-2.yml diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml new file mode 100644 index 000000000..6497c6eb4 --- /dev/null +++ b/.github/workflows/secrets.yml @@ -0,0 +1,8 @@ +name: secrets +on: push +jobs: + get-secrets: + runs-on: ubuntu-latest + steps: + - name: get secrets + run: echo ${{secrets.mylevel}} \ No newline at end of file From ea6c0bfba587a5f30638fd6ebe717893c1561c4d Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Fri, 7 Mar 2025 18:24:16 +0900 Subject: [PATCH 061/104] environment.yml --- .github/workflows/environment.yml | 10 ++++++++++ .github/workflows/{ => part2}/secrets.yml | 0 2 files changed, 10 insertions(+) create mode 100644 .github/workflows/environment.yml rename .github/workflows/{ => part2}/secrets.yml (100%) diff --git a/.github/workflows/environment.yml b/.github/workflows/environment.yml new file mode 100644 index 000000000..154d2c5bf --- /dev/null +++ b/.github/workflows/environment.yml @@ -0,0 +1,10 @@ +name: environment +on: push +jobs: + get-env: + runs-on: ubuntu-latest + steps: + - name: check env & secret + run: | + echo ${{vars.level}} + echo ${{secrets.key}} \ No newline at end of file diff --git a/.github/workflows/secrets.yml b/.github/workflows/part2/secrets.yml similarity index 100% rename from .github/workflows/secrets.yml rename to .github/workflows/part2/secrets.yml From 91fa8cd3fc5261529526a99febb9b865da809d2b Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 11:04:15 +0900 Subject: [PATCH 062/104] add matrix --- .github/workflows/matrix.yml | 14 ++++++++++++++ .github/workflows/{ => part2}/environment.yml | 0 2 files changed, 14 insertions(+) create mode 100644 .github/workflows/matrix.yml rename .github/workflows/{ => part2}/environment.yml (100%) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml new file mode 100644 index 000000000..70ae51268 --- /dev/null +++ b/.github/workflows/matrix.yml @@ -0,0 +1,14 @@ +name: matrix +on: push +jobs: + get-matrix: # job name + startegy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + version: [12,14] + runs-on: ${{ matrix.os }} + steps: + - name: check matrix + run: | + echo ${{matrix.os}} + echo ${{matrix.version}} \ No newline at end of file diff --git a/.github/workflows/environment.yml b/.github/workflows/part2/environment.yml similarity index 100% rename from .github/workflows/environment.yml rename to .github/workflows/part2/environment.yml From ac279166b41e8e749bacf23282fb4061e59fde9a Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 11:06:28 +0900 Subject: [PATCH 063/104] add matrix --- .github/workflows/matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 70ae51268..0cdc4c852 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -2,7 +2,7 @@ name: matrix on: push jobs: get-matrix: # job name - startegy: + strategy: # matrix 설정 matrix: os: [ubuntu-latest, windows-latest, macos-latest] version: [12,14] From 600ab0aa20731d49162b332273d27977c743f4e0 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 11:17:13 +0900 Subject: [PATCH 064/104] add if-1 --- .github/workflows/if-1.yml | 18 ++++++++++++++++++ .github/workflows/{ => part2}/matrix.yml | 0 2 files changed, 18 insertions(+) create mode 100644 .github/workflows/if-1.yml rename .github/workflows/{ => part2}/matrix.yml (100%) diff --git a/.github/workflows/if-1.yml b/.github/workflows/if-1.yml new file mode 100644 index 000000000..9ff6c1fea --- /dev/null +++ b/.github/workflows/if-1.yml @@ -0,0 +1,18 @@ +name: if-1 +on: + push: # push 발생시 + workflow_dispatch: # 수동 실행 + +jobs: + job1: + runs-on: ubuntu-latest + if: github.event_name=='push' # push 이벤트 발생시만 실행 + steps: + - name: job1 + run: echo ${{github.event_name}} + job2: + runs-on: ubuntu-latest + if: github.event_name !='push' # workflow_dispatch 이벤트 발생시만 실행 + steps: + - name: job2 + run: echo ${{github.event_name}} \ No newline at end of file diff --git a/.github/workflows/matrix.yml b/.github/workflows/part2/matrix.yml similarity index 100% rename from .github/workflows/matrix.yml rename to .github/workflows/part2/matrix.yml From a7e5ef45cd4d4ce1e40deb43940a749b63119e1d Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 11:27:25 +0900 Subject: [PATCH 065/104] add if-1 --- .github/workflows/if-1.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/if-1.yml b/.github/workflows/if-1.yml index 9ff6c1fea..92b96804a 100644 --- a/.github/workflows/if-1.yml +++ b/.github/workflows/if-1.yml @@ -15,4 +15,15 @@ jobs: if: github.event_name !='push' # workflow_dispatch 이벤트 발생시만 실행 steps: - name: job2 + run: echo ${{github.event_name}} + job3: + runs-on: ubuntu-latest + + steps: + - name: job1 + if: github.event_name=='push' + run: echo ${{github.event_name}} + # 스탭 단위 + - name: job1 + if: github.event_name!='push' run: echo ${{github.event_name}} \ No newline at end of file From 23a53bcd323b7725fd4c49297db5b24956c78c2b Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 11:47:16 +0900 Subject: [PATCH 066/104] add if-1 --- .github/workflows/if-1.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/if-1.yml b/.github/workflows/if-1.yml index 92b96804a..a7ee51fbe 100644 --- a/.github/workflows/if-1.yml +++ b/.github/workflows/if-1.yml @@ -6,24 +6,22 @@ on: jobs: job1: runs-on: ubuntu-latest - if: github.event_name=='push' # push 이벤트 발생시만 실행 + if: github.event_name == 'push' # push 이벤트 발생시만 실행 steps: - name: job1 - run: echo ${{github.event_name}} + run: echo ${{ github.event_name }} job2: runs-on: ubuntu-latest - if: github.event_name !='push' # workflow_dispatch 이벤트 발생시만 실행 + if: github.event_name != 'push' # workflow_dispatch 이벤트 발생시만 실행 steps: - name: job2 - run: echo ${{github.event_name}} + run: echo ${{ github.event_name }} job3: runs-on: ubuntu-latest - steps: - - name: job1 - if: github.event_name=='push' - run: echo ${{github.event_name}} - # 스탭 단위 - - name: job1 - if: github.event_name!='push' - run: echo ${{github.event_name}} \ No newline at end of file + - name: job3-step1 + if: github.event_name == 'push' # 스탭 단위 + run: echo ${{ github.event_name }} + - name: job3-step2 + if: github.event_name != 'push' # 스탭 단위 + run: echo ${{ github.event_name }} \ No newline at end of file From a6a35846401b3a8d7379238c0788b5e025178dd0 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 12:51:32 +0900 Subject: [PATCH 067/104] add if-2.yml --- .github/workflows/if-2.yml | 16 ++++++++++++++++ .github/workflows/{ => part2}/if-1.yml | 0 2 files changed, 16 insertions(+) create mode 100644 .github/workflows/if-2.yml rename .github/workflows/{ => part2}/if-1.yml (100%) diff --git a/.github/workflows/if-2.yml b/.github/workflows/if-2.yml new file mode 100644 index 000000000..3932c9588 --- /dev/null +++ b/.github/workflows/if-2.yml @@ -0,0 +1,16 @@ +name: if-2 +on: push +jobs: + job1: + runs-on: ubuntu-latest + steps: + - name: exit + run: exit 1 + - name: echo + run: echo "job1" + job2: + needs: job1 + runs-on: ubuntu-latest + steps: + - name: echo + run: echo "job2" \ No newline at end of file diff --git a/.github/workflows/if-1.yml b/.github/workflows/part2/if-1.yml similarity index 100% rename from .github/workflows/if-1.yml rename to .github/workflows/part2/if-1.yml From 1ad422f06cc49bf2ebd0ab60b0929d41b330c578 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 12:54:31 +0900 Subject: [PATCH 068/104] add if-2.yml --- .github/workflows/if-2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/if-2.yml b/.github/workflows/if-2.yml index 3932c9588..43a4bab4a 100644 --- a/.github/workflows/if-2.yml +++ b/.github/workflows/if-2.yml @@ -11,6 +11,7 @@ jobs: job2: needs: job1 runs-on: ubuntu-latest + if: always() # 항상 실행 steps: - name: echo run: echo "job2" \ No newline at end of file From 2eb2a553fc62b73b14da7316458f53a652fe934b Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 12:56:45 +0900 Subject: [PATCH 069/104] add if-2.yml --- .github/workflows/if-2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/if-2.yml b/.github/workflows/if-2.yml index 43a4bab4a..b2e13c7ad 100644 --- a/.github/workflows/if-2.yml +++ b/.github/workflows/if-2.yml @@ -7,6 +7,7 @@ jobs: - name: exit run: exit 1 - name: echo + if: always() # 항상 실행 run: echo "job1" job2: needs: job1 From 740259b30b33bd6baaa073188890b3f83c2419ec Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 13:09:34 +0900 Subject: [PATCH 070/104] add string.yml --- .github/workflows/{ => part2}/if-2.yml | 0 .github/workflows/string-function.yml | 27 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) rename .github/workflows/{ => part2}/if-2.yml (100%) create mode 100644 .github/workflows/string-function.yml diff --git a/.github/workflows/if-2.yml b/.github/workflows/part2/if-2.yml similarity index 100% rename from .github/workflows/if-2.yml rename to .github/workflows/part2/if-2.yml diff --git a/.github/workflows/string-function.yml b/.github/workflows/string-function.yml new file mode 100644 index 000000000..0894e9f82 --- /dev/null +++ b/.github/workflows/string-function.yml @@ -0,0 +1,27 @@ +name: string-function +on: push + +jobs: + string-funtion: + runs-on: ubuntu-latest + step: + - name: startwith + if: startwith('github','git') + run: echo "git" + - name: startwith + if: startwith('github','hub') + run: echo "hub" + + - name: endwith + if: endwith('github','hub') + run: echo "hub" + - name: endwith + if: endwith('github','git') + run: echo "git" + + - name: contains + if: contains('github','hub') + run: echo "hub" + - name: contains + if: contains('github','git') + run: echo "git" \ No newline at end of file From e14842f9c2f6e48206bba033ade151f1806432ce Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 13:11:49 +0900 Subject: [PATCH 071/104] add string.yml --- .github/workflows/string-function.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/string-function.yml b/.github/workflows/string-function.yml index 0894e9f82..5cc27e8a2 100644 --- a/.github/workflows/string-function.yml +++ b/.github/workflows/string-function.yml @@ -4,7 +4,7 @@ on: push jobs: string-funtion: runs-on: ubuntu-latest - step: + steps: - name: startwith if: startwith('github','git') run: echo "git" From 7701f03478e78c78ff14078ac960d473bdd5317f Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Sat, 8 Mar 2025 13:14:44 +0900 Subject: [PATCH 072/104] add string.yml --- .github/workflows/string-function.yml | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/string-function.yml b/.github/workflows/string-function.yml index 5cc27e8a2..74c85ffa8 100644 --- a/.github/workflows/string-function.yml +++ b/.github/workflows/string-function.yml @@ -2,26 +2,26 @@ name: string-function on: push jobs: - string-funtion: + string-function: runs-on: ubuntu-latest steps: - - name: startwith - if: startwith('github','git') - run: echo "git" - - name: startwith - if: startwith('github','hub') - run: echo "hub" + - name: startswith + if: startsWith('github', 'git') + run: echo "git" + - name: startswith + if: startsWith('github', 'hub') + run: echo "hub" - - name: endwith - if: endwith('github','hub') - run: echo "hub" - - name: endwith - if: endwith('github','git') - run: echo "git" + - name: endswith + if: endsWith('github', 'hub') + run: echo "hub" + - name: endswith + if: endsWith('github', 'git') + run: echo "git" - - name: contains - if: contains('github','hub') - run: echo "hub" - - name: contains - if: contains('github','git') - run: echo "git" \ No newline at end of file + - name: contains + if: contains('github', 'hub') + run: echo "hub" + - name: contains + if: contains('github', 'git') + run: echo "git" \ No newline at end of file From 63b6e47d7da0882f329340d9da9a5ae4414a25c7 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 12:04:05 +0900 Subject: [PATCH 073/104] add create_repo.yml --- .github/workflows/create_repo.yml | 30 +++++++++++++++++++ .../workflows/{ => part2}/string-function.yml | 0 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/create_repo.yml rename .github/workflows/{ => part2}/string-function.yml (100%) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml new file mode 100644 index 000000000..558e0a1b8 --- /dev/null +++ b/.github/workflows/create_repo.yml @@ -0,0 +1,30 @@ +name: create-repo +on: + workflow_dispatch: + inputs: + prefix: + description: "set repo prefix" + required: true # 필수 입력값라고 설정 + default: "service" + type: choice + otions: + - example + - service + + name: + description: "set repo name" + required: true + default: "github-actions" + type: string +jobs: + create-repo-automation: + runs-on: ubuntu-latest + steps: + - name: gh auth login + run: | + echo ${{secrets.KEY}} | gh auth login --with-token + # 토큰으로 로그인 + - name: create-repo + run: | + gh repo create gitchulsoo-action/${{inputs.prefix}}-${{inputs.name}} --public --add-readme + # 퍼블릭 레포지토리 생성 diff --git a/.github/workflows/string-function.yml b/.github/workflows/part2/string-function.yml similarity index 100% rename from .github/workflows/string-function.yml rename to .github/workflows/part2/string-function.yml From 9593ad74da42a510156cf7c025742f80d4449817 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 12:17:05 +0900 Subject: [PATCH 074/104] add create_repo.yml --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 558e0a1b8..adfbf9a60 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -22,7 +22,7 @@ jobs: steps: - name: gh auth login run: | - echo ${{secrets.KEY}} | gh auth login --with-token + echo "${{secrets.KEY}}" | gh auth login --with-token # 토큰으로 로그인 - name: create-repo run: | From b5aacfaac51ba04288273ec38cb1d066d3cdf670 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 12:20:54 +0900 Subject: [PATCH 075/104] add create_repo.yml --- .github/workflows/create_repo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index adfbf9a60..91f4e4f6f 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -7,7 +7,7 @@ on: required: true # 필수 입력값라고 설정 default: "service" type: choice - otions: + options: - example - service @@ -22,7 +22,7 @@ jobs: steps: - name: gh auth login run: | - echo "${{secrets.KEY}}" | gh auth login --with-token + echo ${{secrets.KEY}} | gh auth login --with-token # 토큰으로 로그인 - name: create-repo run: | From 99f72361e7ce487fcae09316f248feb24a3cda0d Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 12:24:12 +0900 Subject: [PATCH 076/104] add create_repo.yml --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 91f4e4f6f..b13824db1 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -26,5 +26,5 @@ jobs: # 토큰으로 로그인 - name: create-repo run: | - gh repo create gitchulsoo-action/${{inputs.prefix}}-${{inputs.name}} --public --add-readme + gh repo create r2d2c2/${{inputs.prefix}}-${{inputs.name}} --public --add-readme # 퍼블릭 레포지토리 생성 From 5148d7d2f8467a6853c5aa4172d9bb79081603aa Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 12:28:32 +0900 Subject: [PATCH 077/104] add create_repo.yml --- .github/workflows/create_repo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index b13824db1..e6aba5a33 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -23,8 +23,8 @@ jobs: - name: gh auth login run: | echo ${{secrets.KEY}} | gh auth login --with-token - # 토큰으로 로그인 + # 토큰으로 로그인 - name: create-repo run: | gh repo create r2d2c2/${{inputs.prefix}}-${{inputs.name}} --public --add-readme - # 퍼블릭 레포지토리 생성 + # 퍼블릭 레포지토리 생성 From 8f616babf6a2ca761954c053f9a3b9719278d990 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 12:34:18 +0900 Subject: [PATCH 078/104] add create_repo.yml --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index e6aba5a33..bda343db6 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -22,7 +22,7 @@ jobs: steps: - name: gh auth login run: | - echo ${{secrets.KEY}} | gh auth login --with-token + echo ${{secrets.KEY}} | gh auth login --with-token # 토큰으로 로그인 - name: create-repo run: | From 1de67cea3b23ab69ddae51574105c2cc33cb3d9b Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 14:37:18 +0900 Subject: [PATCH 079/104] add create_repo.yml --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index bda343db6..3b5acc988 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -22,7 +22,7 @@ jobs: steps: - name: gh auth login run: | - echo ${{secrets.KEY}} | gh auth login --with-token + echo ${{secrets.key}} | gh auth login --with-token # 토큰으로 로그인 - name: create-repo run: | From e9a1c514f9b1c7414d28e280b33f0b2fe937ae5d Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Tue, 11 Mar 2025 18:51:10 +0900 Subject: [PATCH 080/104] add create_repo.yml --- .github/workflows/create_repo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 3b5acc988..fb0177fbb 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -5,7 +5,7 @@ on: prefix: description: "set repo prefix" required: true # 필수 입력값라고 설정 - default: "service" + default: "service" # 기본값 설정(입력값이 없을 때) type: choice options: - example @@ -14,7 +14,7 @@ on: name: description: "set repo name" required: true - default: "github-actions" + default: "github-actions" type: string jobs: create-repo-automation: @@ -22,7 +22,7 @@ jobs: steps: - name: gh auth login run: | - echo ${{secrets.key}} | gh auth login --with-token + echo ${{secrets.MYKEY}} | gh auth login --with-token # 토큰으로 로그인 - name: create-repo run: | From 74192b37ac133711a191952a5e7dfded2f1b1ade Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 16:43:58 +0900 Subject: [PATCH 081/104] add create_repo_slack --- .github/workflows/create_repo.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index fb0177fbb..204618501 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -25,6 +25,31 @@ jobs: echo ${{secrets.MYKEY}} | gh auth login --with-token # 토큰으로 로그인 - name: create-repo + id: create-repo run: | gh repo create r2d2c2/${{inputs.prefix}}-${{inputs.name}} --public --add-readme # 퍼블릭 레포지토리 생성 + + - name: slack + if: always() + uses: slackapi/slack-github-action@v1.24.0 + with: + payload: | + { + "attachments":[ + { + "pretext":"create repo result", + "color":"#36a64f", + "fields":[ + { + "title":"create repo result ${{steps.create-repo.outcome}}", + "short":true, + "value":"${{inputs.prefix}}-${{inputs.name}}" + } + ]" + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{secrets.SLACK_KEY}} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From d5d6977b00b19c849582e621890c6e5dc371c6df Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 16:50:22 +0900 Subject: [PATCH 082/104] add create_repo_slack --- .github/workflows/create_repo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 204618501..7752a53f7 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -32,7 +32,7 @@ jobs: - name: slack if: always() - uses: slackapi/slack-github-action@v1.24.0 + uses: slackapi/slack-github-action@v2.0.0 with: payload: | { @@ -49,7 +49,7 @@ jobs: ]" } ] - } + } env: SLACK_WEBHOOK_URL: ${{secrets.SLACK_KEY}} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From 5abd55009f8d928abb4657b7328cc4036c7521bc Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 16:52:04 +0900 Subject: [PATCH 083/104] add create_repo_slack --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 7752a53f7..10afebec9 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -5,7 +5,7 @@ on: prefix: description: "set repo prefix" required: true # 필수 입력값라고 설정 - default: "service" # 기본값 설정(입력값이 없을 때) + default: "service2" # 기본값 설정(입력값이 없을 때) type: choice options: - example From 85419980c634a420fc2b0151bed3f018c48ac994 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 16:54:11 +0900 Subject: [PATCH 084/104] add create_repo_slack --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 10afebec9..e5bdeb546 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -46,7 +46,7 @@ jobs: "short":true, "value":"${{inputs.prefix}}-${{inputs.name}}" } - ]" + ] } ] } From 41f702ed5a84c92ad266528c38c958cb521b8e4f Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 17:06:31 +0900 Subject: [PATCH 085/104] add create_repo_slack --- .github/workflows/create_repo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index e5bdeb546..0e002de22 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -50,6 +50,6 @@ jobs: } ] } - env: - SLACK_WEBHOOK_URL: ${{secrets.SLACK_KEY}} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + env: + slack_webhook_url: ${{ secrets.SLACK_KEY }} + slack_webhook_type: 'incoming-webhook' From 2a6f160d79035357872c2b0c7592d6087d680b4c Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 17:09:18 +0900 Subject: [PATCH 086/104] add create_repo_slack --- .github/workflows/create_repo.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index 0e002de22..daad20a52 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -36,20 +36,21 @@ jobs: with: payload: | { - "attachments":[ - { - "pretext":"create repo result", - "color":"#36a64f", - "fields":[ - { - "title":"create repo result ${{steps.create-repo.outcome}}", - "short":true, - "value":"${{inputs.prefix}}-${{inputs.name}}" - } - ] - } + "attachments": [ + { + "pretext": "create repo result", + "color": "#36a64f", + "fields": [ + { + "title": "create repo result ${{ steps.create-repo.outcome }}", + "short": true, + "value": "${{ github.event.inputs.prefix }}-${{ github.event.inputs.name }}" + } ] - } + } + ] + } env: slack_webhook_url: ${{ secrets.SLACK_KEY }} slack_webhook_type: 'incoming-webhook' + From e8f54bea3ac68cf8a45abe89d2ec8c0a689ade02 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 17:11:35 +0900 Subject: [PATCH 087/104] add create_repo_slack2 --- .github/workflows/create_repo.yml | 105 ++++++++++++++++-------------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index daad20a52..a6a7d00fd 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -1,56 +1,61 @@ name: create-repo on: - workflow_dispatch: - inputs: - prefix: - description: "set repo prefix" - required: true # 필수 입력값라고 설정 - default: "service2" # 기본값 설정(입력값이 없을 때) - type: choice - options: - - example - - service + workflow_dispatch: + inputs: + prefix: + description: "set repo prefix" + required: true + default: "service2" + type: choice + options: + - example + - service + name: + description: "set repo name" + required: true + default: "github-actions" + type: string - name: - description: "set repo name" - required: true - default: "github-actions" - type: string jobs: - create-repo-automation: - runs-on: ubuntu-latest - steps: - - name: gh auth login - run: | - echo ${{secrets.MYKEY}} | gh auth login --with-token - # 토큰으로 로그인 - - name: create-repo - id: create-repo - run: | - gh repo create r2d2c2/${{inputs.prefix}}-${{inputs.name}} --public --add-readme - # 퍼블릭 레포지토리 생성 + create-repo-automation: + runs-on: ubuntu-latest + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_KEY }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + steps: + - name: gh auth login + run: | + echo ${{ secrets.MYKEY }} | gh auth login --with-token + # 토큰으로 로그인 - - name: slack - if: always() - uses: slackapi/slack-github-action@v2.0.0 - with: - payload: | - { - "attachments": [ - { - "pretext": "create repo result", - "color": "#36a64f", - "fields": [ - { - "title": "create repo result ${{ steps.create-repo.outcome }}", - "short": true, - "value": "${{ github.event.inputs.prefix }}-${{ github.event.inputs.name }}" - } - ] - } - ] - } - env: - slack_webhook_url: ${{ secrets.SLACK_KEY }} - slack_webhook_type: 'incoming-webhook' + - name: create-repo + id: create-repo + run: | + gh repo create r2d2c2/${{ github.event.inputs.prefix }}-${{ github.event.inputs.name }} --public --add-readme + # 퍼블릭 레포지토리 생성 + + - name: slack + if: always() + uses: slackapi/slack-github-action@v2.0.0 + with: + payload: | + { + "attachments": [ + { + "pretext": "create repo result", + "color": "#36a64f", + "fields": [ + { + "title": "create repo result ${{ steps.create-repo.outcome }}", + "short": true, + "value": "${{ github.event.inputs.prefix }}-${{ github.event.inputs.name }}" + } + ] + } + ] + } + + env: + SLACK_WEBHOOK_URL: ${{secrets.SLACK_KEY}} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From d6636486ee76507c14f6e40648fc3a96cc56e141 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 17:12:27 +0900 Subject: [PATCH 088/104] add create_repo_slack2 --- .github/workflows/create_repo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index a6a7d00fd..eb76e5215 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -1,4 +1,4 @@ -name: create-repo +name: create-repo2 on: workflow_dispatch: inputs: From c611ea20edb750fb3f42ada71c3e731fb9cc29ac Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 17:14:21 +0900 Subject: [PATCH 089/104] add create_repo_slack2 --- .github/workflows/create_repo.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index eb76e5215..e1827025e 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -54,7 +54,9 @@ jobs: } ] } - + errors: false + payload-templated: false + retries: 5 env: SLACK_WEBHOOK_URL: ${{secrets.SLACK_KEY}} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From 3373e51832252433f098d1d900a5e1a7df148c59 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 17:19:02 +0900 Subject: [PATCH 090/104] add create_repo_slack2 --- .github/workflows/create_repo.yml | 103 ++++++++++++++---------------- 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/.github/workflows/create_repo.yml b/.github/workflows/create_repo.yml index e1827025e..89ca0716e 100644 --- a/.github/workflows/create_repo.yml +++ b/.github/workflows/create_repo.yml @@ -1,63 +1,56 @@ -name: create-repo2 +name: create-repo on: - workflow_dispatch: - inputs: - prefix: - description: "set repo prefix" - required: true - default: "service2" - type: choice - options: - - example - - service - name: - description: "set repo name" - required: true - default: "github-actions" - type: string + workflow_dispatch: + inputs: + prefix: + description: "set repo prefix" + required: true # 필수 입력값라고 설정 + default: "service2" # 기본값 설정(입력값이 없을 때) + type: choice + options: + - example + - service + name: + description: "set repo name" + required: true + default: "github-actions" + type: string jobs: - create-repo-automation: - runs-on: ubuntu-latest - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_KEY }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - steps: - - name: gh auth login - run: | - echo ${{ secrets.MYKEY }} | gh auth login --with-token - # 토큰으로 로그인 + create-repo-automation: + runs-on: ubuntu-latest + steps: + - name: gh auth login + run: | + echo ${{secrets.MYKEY}} | gh auth login --with-token + # 토큰으로 로그인 + - name: create-repo + id: create-repo + run: | + gh repo create r2d2c2/${{inputs.prefix}}-${{inputs.name}} --public --add-readme + # 퍼블릭 레포지토리 생성 - - name: create-repo - id: create-repo - run: | - gh repo create r2d2c2/${{ github.event.inputs.prefix }}-${{ github.event.inputs.name }} --public --add-readme - # 퍼블릭 레포지토리 생성 - - - name: slack - if: always() - uses: slackapi/slack-github-action@v2.0.0 - with: - payload: | - { - "attachments": [ - { - "pretext": "create repo result", - "color": "#36a64f", - "fields": [ + - name: slack + if: always() + uses: slackapi/slack-github-action@v2.0.0 + with: + webhook: ${{ secrets.SLACK_KEY }} + webhook-type: incoming-webhook + payload-templated: true + payload: | + { + "attachments":[ { - "title": "create repo result ${{ steps.create-repo.outcome }}", - "short": true, - "value": "${{ github.event.inputs.prefix }}-${{ github.event.inputs.name }}" + "pretext":"create repo result", + "color":"#36a64f", + "fields":[ + { + "title":"create repo result ${{steps.create-repo.outcome}}", + "short":true, + "value":"${{inputs.prefix}}-${{inputs.name}}" + } + ] } - ] + ] } - ] - } - errors: false - payload-templated: false - retries: 5 - env: - SLACK_WEBHOOK_URL: ${{secrets.SLACK_KEY}} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK From 0ef0b959d7569efcb2119e6072720bef7bc8ad13 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 18:59:45 +0900 Subject: [PATCH 091/104] add issue --- .github/workflows/issue_notify.yml | 26 +++++++++++++++++++ .github/workflows/{ => part3}/create_repo.yml | 0 keyword-list.txt | 0 3 files changed, 26 insertions(+) create mode 100644 .github/workflows/issue_notify.yml rename .github/workflows/{ => part3}/create_repo.yml (100%) create mode 100644 keyword-list.txt diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml new file mode 100644 index 000000000..12bdc49e1 --- /dev/null +++ b/.github/workflows/issue_notify.yml @@ -0,0 +1,26 @@ +name: issue-notify # 워크플로우 이름 +on: + issues: + types: [opened] # 이슈가 열릴 때 트리거 + +jobs: + get-keyword: + runs-on: ubuntu-latest # 최신 우분투 환경에서 실행 + outputs: + level: ${{steps.get-keyword.outputs.level}} # get-keyword 스텝의 출력값을 level로 설정 + steps: + - name: checkout + uses: actions/checkout@v4 # 깃헙 레포지토리를 체크아웃 + - name: get keyword + id: get-keyword + run: | + echo level=Undefined>>$GITHUB_OUTPUT # 기본 level 값을 Undefined로 설정 + keywords=$(cat keyword-list.txt) # keyword-list.txt 파일에서 키워드 목록을 읽음 + for keyword in $keywords; do + if [["${{github.event.issue.title}}"=~ "$keyword"]]; then # 이슈 제목에 키워드가 포함되어 있는지 확인 + echo level=$keyword>>$GITHUB_OUTPUT # 포함되어 있으면 level 값을 해당 키워드로 설정 + fi + done + - name: get output + run: | + echo ${{steps.get-keyword.outputs.level}} # level 값을 출력 diff --git a/.github/workflows/create_repo.yml b/.github/workflows/part3/create_repo.yml similarity index 100% rename from .github/workflows/create_repo.yml rename to .github/workflows/part3/create_repo.yml diff --git a/keyword-list.txt b/keyword-list.txt new file mode 100644 index 000000000..e69de29bb From ba7627454e555f5b6f3591ab0b91b7f8e1fdf087 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 19:02:02 +0900 Subject: [PATCH 092/104] add issue --- keyword-list.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyword-list.txt b/keyword-list.txt index e69de29bb..503fe1db0 100644 --- a/keyword-list.txt +++ b/keyword-list.txt @@ -0,0 +1,2 @@ +critical +normal \ No newline at end of file From 713ef67a515a78da33696a00115b6e5bc151922f Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 19:13:05 +0900 Subject: [PATCH 093/104] add issue --- .github/workflows/issue_notify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index 12bdc49e1..c57b92644 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -17,7 +17,7 @@ jobs: echo level=Undefined>>$GITHUB_OUTPUT # 기본 level 값을 Undefined로 설정 keywords=$(cat keyword-list.txt) # keyword-list.txt 파일에서 키워드 목록을 읽음 for keyword in $keywords; do - if [["${{github.event.issue.title}}"=~ "$keyword"]]; then # 이슈 제목에 키워드가 포함되어 있는지 확인 + if [[ "${{github.event.issue.title}}" =~ "$keyword "]]; then # 이슈 제목에 키워드가 포함되어 있는지 확인 echo level=$keyword>>$GITHUB_OUTPUT # 포함되어 있으면 level 값을 해당 키워드로 설정 fi done From 6988c949e9621816066bd913bcd2d20bb369714e Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 19:16:12 +0900 Subject: [PATCH 094/104] add issue --- .github/workflows/issue_notify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index c57b92644..efad7d605 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -17,7 +17,7 @@ jobs: echo level=Undefined>>$GITHUB_OUTPUT # 기본 level 값을 Undefined로 설정 keywords=$(cat keyword-list.txt) # keyword-list.txt 파일에서 키워드 목록을 읽음 for keyword in $keywords; do - if [[ "${{github.event.issue.title}}" =~ "$keyword "]]; then # 이슈 제목에 키워드가 포함되어 있는지 확인 + if [[ "${{github.event.issue.title}}" =~ "$keyword" ]]; then # 이슈 제목에 키워드가 포함되어 있는지 확인 echo level=$keyword>>$GITHUB_OUTPUT # 포함되어 있으면 level 값을 해당 키워드로 설정 fi done From cad763642f9329cd89ef99ff314f6784dd14e197 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 19:25:08 +0900 Subject: [PATCH 095/104] add issue2 --- .github/workflows/issue_notify.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index efad7d605..8101eff0b 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -24,3 +24,33 @@ jobs: - name: get output run: | echo ${{steps.get-keyword.outputs.level}} # level 값을 출력 + +# slack 추가 + slack: + needs: [get-keyword] # get-keyword 스텝이 성공적으로 완료되면 실행 + if: needs.get-keyword.outputs.level != 'Undefined' + # get-keyword 스텝의 level 값이 Undefined가 아닐 때만 실행 + runs-on: ubuntu-latest + steps: + - name: slack + uses: slackapi/slack-github-action@v2.0.0 # 슬랙 액션 사용 + with: + webhook: ${{ secrets.SLACK_KEY }} # 시크릿에 저장된 슬랙 키 사용 + webhook-type: incoming-webhook + payload-templated: true + payload: | + { + "attachments":[ + { + "pretext":"issue alert message", + "color":"#36a64f", + "fields":[ + { + "title":"Level : ${{needs.get-keyword.outputs.level}}", + "short":true, + "value":"${{github.event.issue.html_url}}" + } + ] + } + ] + } \ No newline at end of file From d441f4ccb4111353ef5588542089b910c74ac2c2 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 19:29:39 +0900 Subject: [PATCH 096/104] add issue2 --- .github/workflows/issue_notify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index 8101eff0b..4a8ccfc10 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -35,7 +35,7 @@ jobs: - name: slack uses: slackapi/slack-github-action@v2.0.0 # 슬랙 액션 사용 with: - webhook: ${{ secrets.SLACK_KEY }} # 시크릿에 저장된 슬랙 키 사용 + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} # 시크릿에 저장된 슬랙 키 사용 webhook-type: incoming-webhook payload-templated: true payload: | From 890c67ce7243c336d7570886148d0194bea782f8 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 19:30:51 +0900 Subject: [PATCH 097/104] add issue2 --- .github/workflows/issue_notify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index 4a8ccfc10..8101eff0b 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -35,7 +35,7 @@ jobs: - name: slack uses: slackapi/slack-github-action@v2.0.0 # 슬랙 액션 사용 with: - webhook: ${{ secrets.SLACK_WEBHOOK_URL }} # 시크릿에 저장된 슬랙 키 사용 + webhook: ${{ secrets.SLACK_KEY }} # 시크릿에 저장된 슬랙 키 사용 webhook-type: incoming-webhook payload-templated: true payload: | From bb23ff48f0300f9585d68cca9621b804d12fab43 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 21:05:47 +0900 Subject: [PATCH 098/104] add issue2 --- .github/workflows/issue_notify.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index 8101eff0b..00a0af553 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -31,6 +31,9 @@ jobs: if: needs.get-keyword.outputs.level != 'Undefined' # get-keyword 스텝의 level 값이 Undefined가 아닐 때만 실행 runs-on: ubuntu-latest + strategy: + matrix: + environment: ["${{needs.get-keyword.outputs.level}}"] steps: - name: slack uses: slackapi/slack-github-action@v2.0.0 # 슬랙 액션 사용 From 2562b9d8d9e3a65f2c315e73bddb9f0c4d3e8120 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Wed, 12 Mar 2025 21:06:26 +0900 Subject: [PATCH 099/104] add issue2 --- .github/workflows/issue_notify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/issue_notify.yml index 00a0af553..6cf4eb176 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/issue_notify.yml @@ -34,6 +34,7 @@ jobs: strategy: matrix: environment: ["${{needs.get-keyword.outputs.level}}"] + environment: ${{ matrix.environment }} steps: - name: slack uses: slackapi/slack-github-action@v2.0.0 # 슬랙 액션 사용 From 348522df8bc8402ae987ba1def97b8ef9ba1e1ed Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 20 Mar 2025 12:27:31 +0900 Subject: [PATCH 100/104] add cicd-1.yml --- .github/workflows/cicd-1.yml | 26 +++++++++++++++++++ .../workflows/{ => part3}/issue_notify.yml | 8 +++--- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/cicd-1.yml rename .github/workflows/{ => part3}/issue_notify.yml (91%) diff --git a/.github/workflows/cicd-1.yml b/.github/workflows/cicd-1.yml new file mode 100644 index 000000000..28572c1d3 --- /dev/null +++ b/.github/workflows/cicd-1.yml @@ -0,0 +1,26 @@ +name: cicd-1 +on: + pull_request: + types: [opened,synchronize,closed] # PR이 열리거나 동기화되거나 닫힐 때 트리거 + branches: [dev] # dev 브랜치에서만 트리거 + paths: + - 'my-app/**' # my-app 디렉토리에서만 트리거 +jobs: + test: # 테스트 작업 + if: github.event.action == 'opened' || github.event.action == 'synchronize' + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + image-build: # 이미지 빌드 작업 + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + deploy: # 배포 작업 + runs-on: ubuntu-latest + needs: [image-build] # image-build 스텝이 성공적으로 완료되면 실행 + steps: + - name: checkout + uses: actions/checkout@v4 \ No newline at end of file diff --git a/.github/workflows/issue_notify.yml b/.github/workflows/part3/issue_notify.yml similarity index 91% rename from .github/workflows/issue_notify.yml rename to .github/workflows/part3/issue_notify.yml index 6cf4eb176..1ca8001c7 100644 --- a/.github/workflows/issue_notify.yml +++ b/.github/workflows/part3/issue_notify.yml @@ -31,10 +31,10 @@ jobs: if: needs.get-keyword.outputs.level != 'Undefined' # get-keyword 스텝의 level 값이 Undefined가 아닐 때만 실행 runs-on: ubuntu-latest - strategy: - matrix: - environment: ["${{needs.get-keyword.outputs.level}}"] - environment: ${{ matrix.environment }} + strategy: # 매트릭스 전략 사용 + matrix: # 매트릭스 설정 + environment: ["${{needs.get-keyword.outputs.level}}"] # get-keyword 스텝의 level 값으로 환경 설정 + environment: ${{ matrix.environment }} # 매트릭스 환경 설정 steps: - name: slack uses: slackapi/slack-github-action@v2.0.0 # 슬랙 액션 사용 From d50bc7e3d7d12a35f5b0ca4ca50e8a6ff704870c Mon Sep 17 00:00:00 2001 From: r2d2c2 <64571095+r2d2c2@users.noreply.github.com> Date: Thu, 20 Mar 2025 12:40:46 +0900 Subject: [PATCH 101/104] Update App.js --- my-app/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/src/App.js b/my-app/src/App.js index 4c5dac388..15bdaccad 100644 --- a/my-app/src/App.js +++ b/my-app/src/App.js @@ -15,7 +15,7 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn GithubAction cicd 2 + Learn GithubAction test2 From eb343dcec2911514862ae4949b601f9ac91f37d1 Mon Sep 17 00:00:00 2001 From: r2d2c2 <64571095+r2d2c2@users.noreply.github.com> Date: Thu, 20 Mar 2025 12:48:35 +0900 Subject: [PATCH 102/104] Update App.js --- my-app/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/src/App.js b/my-app/src/App.js index 15bdaccad..2a948597b 100644 --- a/my-app/src/App.js +++ b/my-app/src/App.js @@ -15,7 +15,7 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn GithubAction test2 + Learn GithubAction mytest From 8d86563d8e587eea06ceef42e158466879af58b3 Mon Sep 17 00:00:00 2001 From: r2d2c2 Date: Thu, 20 Mar 2025 19:00:48 +0900 Subject: [PATCH 103/104] cicd1-1.yml --- .github/workflows/cicd1-1.yml | 118 +++++++++++++++++++++++ .github/workflows/{ => part4}/cicd-1.yml | 0 kubernetes/create-cluster.yaml | 2 +- 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cicd1-1.yml rename .github/workflows/{ => part4}/cicd-1.yml (100%) diff --git a/.github/workflows/cicd1-1.yml b/.github/workflows/cicd1-1.yml new file mode 100644 index 000000000..88930a820 --- /dev/null +++ b/.github/workflows/cicd1-1.yml @@ -0,0 +1,118 @@ +name: cicd-1 +on: + pull_request: + types: [opened,synchronize,closed] + branches: [dev] + paths: + - 'my-app/**' +jobs: + test: # 테스트 작업 + if: github.event.action == 'opened' || github.event.action == 'synchronize' + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: setup-node + uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Cache Node.js modules + uses: actions/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 build + + + image-build: # 이미지 빌드 작업 + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + permissions: # 권한 설정 + id-token: write + contents: read + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: aws + id: credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{vars.AWS_REGION}} + role-to-assume: ${{secrets.AWS_ROLE_TO_ASSUME}} + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: 'true' + - name: docker build & push + run: | + docker build -f Dockerfile -tag ${{secrets.REGISTRY}}/${{vars.REPOSITORY}}:${{github.sha}} . + docker push ${{secrets.REGISTRY}}/${{vars.REPOSITORY}}:${{github.sha}} + + + deploy: # 배포 작업 + runs-on: ubuntu-latest + needs: [image-build] # image-build 스텝이 성공적으로 완료되면 실행 + # 권한 설정 + permissions: + id-token: write + contents: read + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: aws + id: credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{vars.AWS_REGION}} + role-to-assume: ${{secrets.AWS_ROLE_TO_ASSUME}} + - name: setup kubectl + uses: azure/setup-kubectl@v3 + with: + version: latest + - name: setup helm + uses: azure/setup-helm@v3 + with: + version: v3.11.1 + + - name: access kubernetes + run: | + aws eks update-kubeconfig --name ${{vars.EKS_CLUSTER_NAME}} + - name: deploy + id: status + run: | + helm upgrade --install my-app kube/my-app --create-namespace --namespace my-app-${{vars.SUFFIX}} \ + --set image.tag=${{github.sha}} \ + --set image.repository=${{vars.REPOSITORY}}/${{vars.REPOSITORY}} + - name: notify + if: always() + # slack 알림 + uses: slackapi/slack-github-action@v2.0.0 + with: + webhook: ${{ secrets.SLACK_KEY }} + webhook-type: incoming-webhook + payload-templated: true + payload: | + { + "text":"message", + "blocks":[ + { + "type":"section", + "text":{ + "type":"mrkdwn", + "text":"Environment : dev, Deployed : ${{steps.status.outcome}}, Repository : ${{github.repository}}" + } + } + ] + } \ No newline at end of file diff --git a/.github/workflows/cicd-1.yml b/.github/workflows/part4/cicd-1.yml similarity index 100% rename from .github/workflows/cicd-1.yml rename to .github/workflows/part4/cicd-1.yml diff --git a/kubernetes/create-cluster.yaml b/kubernetes/create-cluster.yaml index 7357f45c6..3162ff3d2 100644 --- a/kubernetes/create-cluster.yaml +++ b/kubernetes/create-cluster.yaml @@ -4,7 +4,7 @@ kind: ClusterConfig metadata: name: github-actions-cluster region: ap-northeast-2 - version: "1.29" + version: "1.32" iamIdentityMappings: - arn: arn:aws:iam::${ACCOUNT_ID}:role/github-actions From eccf7bb1a45eb04f7996e97c8c3a3f6c658ed3fd Mon Sep 17 00:00:00 2001 From: r2d2c2 <64571095+r2d2c2@users.noreply.github.com> Date: Thu, 20 Mar 2025 19:24:35 +0900 Subject: [PATCH 104/104] Update App.js --- my-app/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/src/App.js b/my-app/src/App.js index 2a948597b..17967108c 100644 --- a/my-app/src/App.js +++ b/my-app/src/App.js @@ -15,7 +15,7 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn GithubAction mytest + Learn GithubAction run cicd1