forked from DevOps-and-Cloud-based-Software/2.fastapi-gitops
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 780 Bytes
/
ci-cd.yml
File metadata and controls
42 lines (38 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: CI/CD Pipeline
on:
release:
types: [ published ]
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
test:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
build:
name: Build Docker Image
runs-on: ubuntu-latest
needs: [lint, test]
if: github.event_name == 'push' || github.event_name == 'release'
permissions:
contents: read
actions: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4