Professional Documents
Culture Documents
Workflow Yml
Workflow Yml
lang
on:
push:
branches: [ main ] # Lấy code từ nhánh main nếu có ai push code lên
pull_request:
branches: [ main ] # Lấy code từ nhánh main nếu có ai gửi pull request
# A workflow run is made up of one or more jobs that can run sequentially or in
parallel
jobs: # Những công việc dev làm thường ngày: lấy code, build, chạy test, đóng gói,
gửi build...
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access
it
- name: Check-out repository # Lấy code từ kho thảy vào máy ảo của GitHub
chuẩn bị build ở bước sau
uses: actions/checkout@v3
- name: Distribute jar-war file # Gửi file .jar .war đi đâu, CD nhảy vào ...
run: mkdir staging && cp dist/*.jar staging # tạo thư mục staging chứa file
.jar .war sau khi build