Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
7de5207
Add push.yaml
sandyleemingyu Nov 4, 2025
2e98191
Delete .github/workflows directory
oramyking Nov 4, 2025
6641e00
Add push.yaml
oramyking Nov 4, 2025
1b53126
Add push.yaml
oramyking Nov 4, 2025
d771852
Add push.yaml
oramyking Nov 4, 2025
f10465c
Add pull_request.yaml
oramyking Nov 4, 2025
535a215
Add pull_request.yaml
oramyking Nov 4, 2025
dd1180f
Add issues.yaml
oramyking Nov 4, 2025
522064f
add issue-comment.yaml
oramyking Nov 4, 2025
a94714c
add dispatch.yaml
oramyking Nov 5, 2025
37d8e25
add mutlple_event.yaml
oramyking Nov 5, 2025
326269a
add needs.yaml
oramyking Nov 5, 2025
361b2b9
add rerun.yaml
oramyking Nov 5, 2025
6288d48
add rerun.yaml
oramyking Nov 5, 2025
e6df75a
change readme
oramyking Nov 5, 2025
c42f45c
add
oramyking Nov 5, 2025
599bce2
dispatch
oramyking Nov 5, 2025
7a340dd
rerun
oramyking Nov 5, 2025
fa6ff99
checkout
oramyking Nov 5, 2025
c773d77
checkout
oramyking Nov 5, 2025
70ec5a4
context
oramyking Nov 5, 2025
318ed3b
ifcontext
oramyking Nov 5, 2025
0d1f680
add
oramyking Nov 5, 2025
8ab90d1
add 1
oramyking Nov 5, 2025
e9cd936
add 2
oramyking Nov 5, 2025
f2fa67f
path1
oramyking Nov 5, 2025
06052a6
path2
oramyking Nov 5, 2025
c015891
path3
oramyking Nov 5, 2025
c5b1805
path4
oramyking Nov 5, 2025
d511d74
path5
oramyking Nov 5, 2025
9c17154
tag-filter.yaml
oramyking Nov 5, 2025
438963e
tag-filter.yaml
oramyking Nov 5, 2025
3943ebc
timeout1
oramyking Nov 5, 2025
4c8094f
timeout1
oramyking Nov 5, 2025
6c5ec96
timeout2
oramyking Nov 5, 2025
249881a
timeout3
oramyking Nov 5, 2025
10dbb0d
cache.yaml
oramyking Nov 5, 2025
08dd482
cache1.yaml
oramyking Nov 5, 2025
2b69540
artifact.yaml
oramyking Nov 6, 2025
6bd0378
artifact.yaml
oramyking Nov 6, 2025
985da98
artifact1.yaml
oramyking Nov 6, 2025
6d1a87b
add output
oramyking Nov 6, 2025
bf3529e
output3.yaml
oramyking Nov 6, 2025
6c55055
env1
oramyking Nov 6, 2025
008e591
env2
oramyking Nov 6, 2025
dd5de59
env2
oramyking Nov 6, 2025
1c03fa6
env2
oramyking Nov 6, 2025
46f466e
env2
oramyking Nov 6, 2025
01839d0
get secret
oramyking Nov 6, 2025
15d5153
environemtn
oramyking Nov 6, 2025
77d04cb
env
oramyking Nov 6, 2025
e11942a
env
oramyking Nov 6, 2025
fb4481e
env
oramyking Nov 6, 2025
e3ac2e8
env
oramyking Nov 6, 2025
27fbbb1
ifcond
oramyking Nov 7, 2025
f6df063
ifcond2
oramyking Nov 7, 2025
17c39fa
ifcond22
oramyking Nov 7, 2025
86fe2b2
ifcond2-1
oramyking Nov 7, 2025
c874d93
ifcond2-2
oramyking Nov 7, 2025
f17402a
ifcond2-3
oramyking Nov 7, 2025
e1b8ec9
check str
oramyking Nov 7, 2025
118864b
check str1
oramyking Nov 7, 2025
16d2861
check str2
oramyking Nov 7, 2025
aa97b11
check str3
oramyking Nov 7, 2025
b80c36e
first
oramyking Nov 7, 2025
09b958c
seconds
oramyking Nov 7, 2025
6e5e0eb
third
oramyking Nov 7, 2025
df3d6b3
final
oramyking Nov 7, 2025
233bd12
verity
oramyking Nov 7, 2025
0f1f422
verify2
oramyking Nov 10, 2025
9ca51f6
verify3
oramyking Nov 10, 2025
bcd3800
check pat
oramyking Nov 10, 2025
0888652
add cicd-1.yaml
oramyking Nov 11, 2025
2c3791f
add cicd-1.yaml
oramyking Nov 11, 2025
c6aa225
add cicd1.yaml
oramyking Nov 11, 2025
094174e
Update App.js
oramyking Nov 11, 2025
8e9bde4
Update App.js
oramyking Nov 11, 2025
f1ee59b
Merge pull request #14 from sandy-action/featue-cicd1
oramyking Nov 11, 2025
23d8fe6
clean
oramyking Nov 13, 2025
6875c1b
cicd
oramyking Nov 13, 2025
22f1973
first
oramyking Nov 13, 2025
5780911
Update App.js
oramyking Nov 13, 2025
e2334a0
Merge pull request #16 from sandy-action/feature-cicd1-aws1
oramyking Nov 14, 2025
3f41bbf
Update App.js
oramyking Nov 14, 2025
47409c2
Merge pull request #17 from sandy-action/feature-cicd1-aws1
oramyking Nov 14, 2025
e1f2de9
cicd2
oramyking Nov 14, 2025
dcd8ab5
Update App.js
oramyking Nov 14, 2025
ff1b07b
Merge pull request #18 from sandy-action/feature-cide2
oramyking Nov 14, 2025
20f0b4e
add cicd2-new
oramyking Nov 26, 2025
4d1ec5b
Update App.js
oramyking Nov 26, 2025
830e088
Merge pull request #20 from sandy-action/feature-cicd2
oramyking Nov 26, 2025
93a573b
abc
oramyking Dec 1, 2025
269b9ef
Update App.js
oramyking Dec 1, 2025
ce090bd
Merge pull request #22 from sandy-action/feature-cicd2-aws1
oramyking Dec 1, 2025
5e453c0
new cicd3
oramyking Dec 5, 2025
6ca1856
Update App.js
oramyking Dec 5, 2025
c755b59
Merge pull request #24 from sandy-action/feature-cicd3-aws
oramyking Dec 5, 2025
0234da7
Update App.js
oramyking Dec 5, 2025
acb76fa
Merge pull request #26 from sandy-action/feature-cicd3-aws
oramyking Dec 5, 2025
4faca1e
cicd4
oramyking Dec 10, 2025
e380f1a
Update App.js
oramyking Dec 16, 2025
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
234 changes: 234 additions & 0 deletions .github/workflows/cicd-4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
name: cicd-4
on:
push:
paths:
- 'my-app/**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
types: [opened, synchronize, closed]
branches: [dev, master]
paths:
- 'my-app/**'

jobs:
test:
if: github.event.action == 'opened' || github.event.action == 'synchronize'
runs-on: ubuntu-latest
steps:
- name: checkout the code
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

set-environment:
if: github.event.pull_request.merged == true || github.ref_type == 'tag'
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.set-env.outputs.environment }}
steps:
- name: set env
id: set-env
run: |
if [[ ${{ github.ref_type }} == "tag" ]]; then
echo "environment=qa" >> $GITHUB_OUTPUT
exit 0
fi

if [[ ${{ github.ref_type }} == "branch" ]]; then
echo "environment=dev" >> $GITHUB_OUTPUT
if [[ ${{ github.base_ref }} == "master" ]]; then
echo "environment=staging" >> $GITHUB_OUTPUT
fi
fi
- name: check env
run: echo ${{ steps.set-env.outputs.environment }}


image-build:
runs-on: ubuntu-latest
needs: [set-environment]
permissions:
id-token: write
contents: read
strategy:
matrix:
environment: ["${{ needs.set-environment.outputs.environment }}"]
environment: ${{ matrix.environment }}
steps:
- name: checkout the code
uses: actions/checkout@v4
- name: Configure AWS Credentials
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: [ set-environment, image-build ]
permissions:
id-token: write
contents: read
strategy:
matrix:
environment: ["${{ needs.set-environment.outputs.environment }}"]
environment: ${{ matrix.environment }}
steps:
- name: checkout the code
uses: actions/checkout@v4
- name: Configure AWS Credentials
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.CLUSTER_NAME }}
- name: deploy
id: status
run: |
helm upgrade --install my-app kubernetes/my-app --create-namespace --namespace my-app-${{ vars.SUFFIX }} \
--set image.tag=${{ github.sha }} \
--set image.repository=${{ secrets.REGISTRY }}/${{ vars.REPOSITORY }}
- name: notify
if: always()
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
"text": "message",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Environment : ${{ matrix.environment }}, Deploy Result : ${{ steps.status.outcome }}, Repository : ${{ github.repository }}."
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

create-pr:
if: needs.set-environment.outputs.environment == 'qa'
runs-on: ubuntu-latest
needs: [set-environment, deploy]
steps:
- name: checkout
uses: actions/checkout@v4
- name: gh auth login
run: |
echo ${{ secrets.PERSONAL_ACCESS_TOKEN }} | gh auth login --with-token
- name: create branch
run: |
git checkout -b release/${{ github.ref_name }}
git push origin release/${{ github.ref_name }}
- name: create pr
run: |
gh pr create --base master --head release/${{ github.ref_name }} --title "release/${{ github.ref_name }} -> master" --body "release pr"

approve:
if: needs.set-environment.outputs.environment == 'staging'
runs-on: ubuntu-latest
environment: approve-process
needs: [set-environment, deploy]
steps:
- name: approve
run: |
echo "Approve Done"

prod-deploy:
runs-on: ubuntu-latest
needs: [ approve ]
permissions:
id-token: write
contents: read
strategy:
matrix:
environment: ["prod"]
environment: ${{ matrix.environment }}
steps:
- name: checkout the code
uses: actions/checkout@v4
- name: Configure AWS Credentials
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.CLUSTER_NAME }}
- name: deploy
id: status
run: |
helm upgrade --install my-app kubernetes/my-app --create-namespace --namespace my-app-${{ vars.SUFFIX }} \
--set image.tag=${{ github.sha }} \
--set image.repository=${{ secrets.REGISTRY }}/${{ vars.REPOSITORY }}
- name: notify
if: always()
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
"text": "message",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Environment : ${{ matrix.environment }}, Deploy Result : ${{ steps.status.outcome }}, Repository : ${{ github.repository }}."
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# github-actions-setting
# github-actions sandy
2 changes: 2 additions & 0 deletions keyword-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
critical
normal
2 changes: 1 addition & 1 deletion my-app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function App() {
target="_blank"
rel="noopener noreferrer"
>
Learn GithubAction cicd
Learn GithubAction version7
</a>
</header>
</div>
Expand Down