Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 913 Bytes

File metadata and controls

52 lines (38 loc) · 913 Bytes

GitHub Actions: Common Actions


Actions are reusable units of code that simplify tasks in workflows. They allow you to reuse existing scripts or create your own. Actions are useful for tasks like:

  • Checking out the repository
  • Setting up programming environments
  • Installing dependencies

1. Checkout Repository

  • Always first step to clone repository.
- name: Checkout code
  uses: actions/checkout@v4

2. Setup Node.js

- name: Setup Node.js
  uses: actions/setup-node@v4
  with:
    node-version: '18'

3. Setup Python

- name: Setup Python
  uses: actions/setup-python@v5
  with:
    python-version: '3.11'

4. Docker Build & Push

- name: Build & Push Docker
  uses: docker/build-push-action@v6
  with:
    context: .
    push: true
    tags: user/app:latest