Câu 12: GH-200: GitHub Actions
You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you to implement the conditional execution of the job?
Nội dung câu hỏi
You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you to implement the conditional execution of the job?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. jobs:deploy:if: github.ref_name == 'feature-branch'runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3 — đáp án hiện tại
- B. jobs:deploy:if: github.branch.name == 'feature-branch'runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3
- C. jobs:deploy:if: github.ref.name == 'feature-branch'runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3
- D. jobs:deploy:if: github.branch_name == 'feature-branch'runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.