Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d53d8e3
Add push.yaml
znehraks Oct 31, 2024
faf484d
modify push.yaml
znehraks Oct 31, 2024
149a0f2
Add pull_request.yaml
znehraks Oct 31, 2024
057b425
types: opened
znehraks Oct 31, 2024
4d865ba
issue.yaml
znehraks Nov 7, 2024
8c13325
Merge pull request #2 from designc-action/pr-test-3
znehraks Nov 7, 2024
6c3eab2
Add workflow_dispatch.yaml
znehraks Nov 7, 2024
392b0ea
Add multiple event workflow
znehraks Nov 7, 2024
c2ffe8c
Add needs.yml
znehraks Nov 7, 2024
7cbedf9
checkout.yaml
znehraks Dec 12, 2024
05efc0a
context.yaml
znehraks Dec 12, 2024
98cc5e9
add echo
znehraks Dec 12, 2024
63a3970
branch-filter.yaml
znehraks Dec 12, 2024
49fa0bc
to dev-test
znehraks Dec 12, 2024
b7082b9
revert
znehraks Dec 12, 2024
e94efe8
path_filter.yaml
znehraks Dec 12, 2024
faa985a
path_filter trigger
znehraks Dec 12, 2024
28ffa8c
path_filter trigger
znehraks Dec 12, 2024
4b23868
apply path_filter.yaml ignore:
znehraks Dec 12, 2024
ea2b9b4
it works
znehraks Dec 12, 2024
810fd5f
tag_filter.yaml
znehraks Dec 12, 2024
9ef86db
timeout.yaml
znehraks Dec 12, 2024
6b31937
trigger
znehraks Dec 12, 2024
16b06bd
cache
znehraks Dec 12, 2024
ef82adb
cache2
znehraks Dec 12, 2024
852331c
cache3
znehraks Dec 12, 2024
2f9ad60
cache test
znehraks Dec 12, 2024
9d99aa1
artifact
znehraks Dec 12, 2024
bcc02dc
output
znehraks Dec 12, 2024
1950638
job layer output
znehraks Dec 12, 2024
49b48fd
env
znehraks Dec 15, 2024
a1b1589
var-2
znehraks Dec 15, 2024
f5dc667
secrets
znehraks Dec 15, 2024
a262fa9
enviroment
znehraks Dec 15, 2024
078f119
repository enviroment
znehraks Dec 15, 2024
7246fee
force-trigger
znehraks Dec 15, 2024
f90a995
matrix
znehraks Dec 15, 2024
2d81e9a
if
znehraks Dec 15, 2024
3e9bcba
step level if
znehraks Dec 15, 2024
76aa1a9
skip
znehraks Dec 15, 2024
a26bb5a
always:
znehraks Dec 15, 2024
d5e39da
step level always
znehraks Dec 15, 2024
18820d5
string functions
znehraks Dec 15, 2024
8a860b6
create-repo-automation
znehraks Dec 15, 2024
c3848f7
slack
znehraks Dec 15, 2024
2033af5
오타
znehraks Dec 15, 2024
e5ef83e
add issue_notify.yaml
znehraks Dec 16, 2024
45b6c98
fix
znehraks Dec 16, 2024
24436b9
add slack jobs
znehraks Dec 16, 2024
898aab6
add ','
znehraks Dec 16, 2024
6b5cc04
add environment
znehraks Dec 16, 2024
4332ce0
add matrix to representative effect
znehraks Dec 16, 2024
ae67a6c
add keyword
znehraks Dec 16, 2024
ae8b730
cicd-1
znehraks Dec 29, 2024
e0faebc
Update App.js
znehraks Dec 29, 2024
35b67c5
Update App.js
znehraks Dec 29, 2024
bb79c06
Merge pull request #21 from designc-action/feature-cicd1
znehraks Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/cicd-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: cicd-1
on:
pull_request:
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

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]
steps:
- name: checkout
uses: actions/checkout@v4
17 changes: 17 additions & 0 deletions .github/workflows/part1/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: issue-workflow
on:
issues:
types: [opened]

jobs:
issue-job:
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github~


17 changes: 17 additions & 0 deletions .github/workflows/part1/issue_comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: issue-comment-workflow
on: issue_comment

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

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

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

jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: echo
run: echo "job1 done"
job2:
runs-on: ubuntu-latest
needs: [job1]
steps:
- name: echo
run: echo "job2 done"
job3:
runs-on: ubuntu-latest
steps:
- name: echo
run: |
echo "job3 failed"
exit 1
job4:
runs-on: ubuntu-latest
needs: [job3]
steps:
- name: echo
run: echo "job4 done"
17 changes: 17 additions & 0 deletions .github/workflows/part1/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pull-request-workflow 1
on:
pull_request:
types: [opened]

jobs:
pull-request-job:
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github~


14 changes: 14 additions & 0 deletions .github/workflows/part1/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: push-workflow 21
on: push

jobs:
push-job:
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github~

32 changes: 32 additions & 0 deletions .github/workflows/part1/workflow_dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: workflow-dispatch
on:
workflow_dispatch:
inputs:
name:
description: 'set name'
required: true
default: 'github-actions'
type: string
environment:
description: 'set env'
required: true
default: 'dev'
type: choice
options:
- dev
- qa
- prod
jobs:
workflow-dispatch-job:
runs-on: ubuntu-latest
steps:
- name: step1
run: echo hello world
- name: step2
run: |
echo hello world
echo github action
- name: echo inputs
run: |
echo ${{ inputs.name }}
echo ${{ inputs.environment }}
27 changes: 27 additions & 0 deletions .github/workflows/part2/artifact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: artifact
on: push

jobs:
upload-artifact:
runs-on: ubuntu-latest
steps:
- name: echo
run: echo hello-world > hello.txt
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-test
path: ./hello.txt


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

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

jobs:
cache:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup-cache
uses: actions/setup-node@v3
with:
node-version: 20
- 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
19 changes: 19 additions & 0 deletions .github/workflows/part2/checkout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: checkout
on: workflow_dispatch

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

checkout:
runs-on: ubuntu-latest
steps:
- name: use checkout action
uses: actions/checkout@v4
- name: check file list
run: cat README.md


13 changes: 13 additions & 0 deletions .github/workflows/part2/context.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: context
on: workflow_dispatch

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

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

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

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

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

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

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

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

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

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

Loading