Deploy Cloud‑Native CI/CD with GitHub Actions and Alibaba Cloud ACK
This guide explains how to use GitHub Actions together with Alibaba Cloud Container Service (ACK) and Container Registry (ACR) to build a lightweight, automated CI/CD pipeline that packages an Nginx app into a container, pushes it to ACR, and deploys it to ACK, illustrating a practical DevOps workflow.
Background and Motivation
According to the 2020 China DevOps Survey, 63% of enterprises have adopted DevOps, but 20% still find it complex because self‑hosted Jenkins requires deployment and plugin maintenance, while SaaS CI/CD tools are often cumbersome to configure. A lightweight, ready‑to‑use solution is needed.
GitHub Actions Overview
GitHub Actions, launched in October 2018, is a SaaS‑hosted CI tool that lets you define reusable Actions and compose them into Workflows . It runs on GitHub‑provided virtual machines or containers, supports Linux, macOS, Windows, and many languages, and offers a free tier for public repositories.
The core concepts are:
Workflow : a YAML file in .github/workflows that defines when and how the pipeline runs.
Job : a set of steps that run in parallel or sequentially.
Step : an individual command or action within a job.
Action : a reusable command block, defined in YAML, that can be shared via the Marketplace.
Example workflow:
name: Greeting
on: push
jobs:
my-job:
name: My Job
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Greeting
run: |
echo 'Welcome to Alibaba Cloud!'Alibaba Cloud Container Service (ACK) and ACR
ACK (Alibaba Cloud Container Service for Kubernetes) is a certified Kubernetes service that provides high‑performance container management for enterprise workloads. The ACK Pro edition adds higher reliability, security, and SLA guarantees for production‑grade use.
ACR (Alibaba Cloud Container Registry) stores container images. The enterprise edition (ACR EE) offers dedicated instances, multi‑architecture support, Helm Chart and OCI artifact hosting, security scanning, image signing, and accelerated global distribution, reducing container start‑up time by up to 60%.
Preparation Steps
Enable ACR, create a namespace and repository (use ACR EE for high‑security or high‑performance needs).
Enable ACK, create a Kubernetes cluster (consider ACK Pro for production).
Create a GitHub repository and add the application code and deployment YAML templates.
Practical Workflow
1) Create the Workflow
In the GitHub repository, go to the Actions tab and select the “Deploy to Alibaba Cloud ACK” template. GitHub creates .github/workflows/alibabacloud.yml.
2) Update Variables
Modify the workflow to set your region, ACR repository, and ACK cluster. Add ACCESS_KEY_ID and ACCESS_KEY_SECRET as encrypted secrets in the repository settings.
3) Automatic Deployment
When a new Release is published, the workflow triggers: it builds the Docker image, pushes it to ACR, runs security scans, and deploys the image to ACK. If a vulnerability is detected, the pipeline aborts before deployment, enabling a DevSecOps flow.
4) Extension
Search the GitHub Actions Marketplace for additional actions to customize the pipeline (e.g., multi‑platform matrix builds, code quality checks, or custom deployment steps).
Conclusion
Compared with self‑hosted Jenkins, GitHub Actions provides a fully managed, zero‑maintenance CI/CD experience with native GitHub integration and a rich marketplace. The combined GitHub Action + ACK solution offers a streamlined, cloud‑native path for enterprises to accelerate digital transformation and adopt DevOps practices.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Alibaba Cloud Native
We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
