Skip to content

Commit dd137c7

Browse files
👷 Add CICD pipeline
1 parent 76f3a9b commit dd137c7

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎.github/workflows/CD.yml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Docker Image CD
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Python
12+
uses: actions/setup-python@v3
13+
with:
14+
python-version: "3.9"
15+
- name: GithubPackages Login
16+
uses: docker/login-action@v1.10.0
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Extract metadata (tags, labels) for Docker
22+
id: meta
23+
uses: docker/metadata-action@v3
24+
with:
25+
images: ghcr.io/${{ github.repository }}
26+
- name: Build and push Docker images
27+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
28+
uses: docker/build-push-action@v2
29+
with:
30+
context: .
31+
push: true
32+
tags: ${{ steps.meta.outputs.tags }}
33+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)